[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A strange load problem
From: |
John W. Eaton |
Subject: |
Re: A strange load problem |
Date: |
Fri, 18 Aug 2006 00:38:56 -0400 |
On 17-Aug-2006, Dmitri A. Sergatskov wrote:
| On 8/17/06, John W. Eaton <address@hidden> wrote:
|
| >
| > How about sending the file as a binary attachment so we can know
| > precisely what characters are in the file?
|
| Actually I can reproduce at least some of the problem.
| If I have a text file (say "a.txt") with one line (actually that
| doesn't seems to matter) that contains a number, say
| 123
|
| Then, in octave
| load a.txt
| seems to work fine for me -- it creates a variable a and assigns
| 123 to it.
| But, if I tried to load the same file with a key "-text" or
| "-ascii" it fails with an error:
|
| error: load: empty name keyword or no data found in file `testxx.txt'
|
| If I add to the top of the file
|
| # name: a
| # type: scalar
|
| everything works.
|
| I kind of remember a discussion that "-text" suppose to have this
| header and "-ascii" does not, but not sure. The help pretty much tells us
| that both of those will save in "octave text format" and "-ascii" _will_
| change in the future...
| So I an not sure if this is a bug and not a feature.
It's transitional. We used to have "save -ascii" meaning "save in
Octave's format with the header" and "load -ascii" meaning "load a
file and expect it to be in Octave's format with the header" but we
need -ascii to be Matlab compatible. So currently -text and -ascii
mean the same thing (the old way). Maybe now it is time to split them
in the 2.9.x sources so -ascii has the compatible meaning and -text
means write and require the headers. My feeling is that this change
must be done for 3.0 and now is a reasonable time to make the switch.
If anyone objects, I'd like to know about it soon.
jwe