From bug-request at octave dot org Thu Dec 16 07:27:30 2004 Subject: RE: Possible Error in -ascii save/restore From: To: Cc: Date: Thu, 16 Dec 2004 03:34:38 -0600 John Here is what my mount command gives: $ mount C:\cygwin\bin on /usr/bin type system (textmode) C:\cygwin\lib on /usr/lib type system (textmode) C:\cygwin on / type system (textmode) So I guess it is mounted in textmode. ;) When installing cygwin I remember being asked if I wanted text-files saved in "DOS or UNIX" mode. I guess this has to do with using different line terminations. Since other people also may read my text files I opted for "DOS" mode. Regards, Hallvard -----Original Message----- From: John W. Eaton [mailto:jwe at bevo dot che dot wisc dot edu] Sent: 15. desember 2004 20:38 To: Paulsen, Hallvard Cc: bug at octave dot org Subject: Possible Error in -ascii save/restore On 15-Dec-2004, Hallvard dot Paulsen at wartsila dot com wrote: | Description: | ----------- | | * It looks to me like there is a problem when saving/loading | variables to file in -ascii mode | | Repeat-By: | --------- | $ octave | GNU Octave, version 2.1.63 (i686-pc-cygwin). | Copyright (C) 2004 John W. Eaton. | This is free software; see the source code for copying conditions. | There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or | FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. | | Additional information about Octave is available at | http://www.octave.org. | | Please contribute if you find this software useful. | For more information, visit http://www.octave.org/help-wanted.html | | Report bugs to (but first, please read | http://www.octave.org/bugs.html to learn how to write a helpful | report). | | octave:1> Vector=[1, 2, 3] | Vector = | | 1 2 3 | | octave:2> save -ascii vector.dat Vector | octave:3> load -ascii vector.dat Vector | error: load: failed to extract number of rows and columns | error: load: trouble reading ascii file `vector.dat' | error: load: reading file vector.dat | octave:3> save -binary vector.dat Vector | octave:4> load -binary -force vector.dat Vector | octave:5> Vector | Vector = | | 1 2 3 | | octave:6> | | Fix: | --- | | Well, I'm a newbee with octave, so I guess I cannot contribute much | here. It looks like binary save works, so I'll use that for the time | being. It may also be a cygwin specific bug. I see the problem, but I don't know of a quick fix. When you installed Cygwin, did you choose to mount the filesystems in text mode? If so, then I think you can mount the filesystems in binary mode to avoid the bug. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------