octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Improving strread / textread / textscan


From: Ben Abbott
Subject: Re: Improving strread / textread / textscan
Date: Sun, 23 Oct 2011 22:12:39 -0400

On Oct 23, 2011, at 8:37 PM, Ben Abbott wrote:

> I'll prepare a changeset.
> 
> Ben

A changeset is atached (I won't push until I get feedback)

It appears to me that whitespace is treated different from delimiters. 
Specifically repeated whitespace is always treated as a single delimiter (i'll 
need to check what happens when the "delimiter" parameter include white-space 
characters), and repeated delimiters imply an empty field which (for numeric 
data) is set equal to "emptyvalue".

Thus, "emptyvalue" only substituted for missing numeric data between non-white 
space delimiters (those characters explicitly specified as "delimiters")

The default value for "emptyvalue" is NaN, unless NaN cannot be represented by 
the data type (int32 for example). When NaN isn't value zero is used.

I've added some tests and xtests. Some of the xtests conflict with tests. I've 
added comments to the tests in the hope of avoiding confusion.

I still plan to add more tests for other functionality which is present in ML 
but not in Octave. I'll add those as xtests as well and push them as I don't 
expect any discussion is needed.

Ben

Attachment: changeset.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]