From bug-octave-request at bevo dot che dot wisc dot edu Fri Nov 6 13:34:15 1998 Subject: more 2.1.8 problems From: "John W. Eaton" To: Joao Cardoso Cc: bug-octave Date: Fri, 6 Nov 1998 13:33:49 -0600 (CST) On 6-Nov-1998, Joao Cardoso wrote: | Also, I don't know how to use the new `for i=string', | | octave-2.1.8:2> a="a b c d" | a = a b c d | octave-2.1.8:3> for i=a;i,end | error: invalid type in for loop expression near line 3, column 1 | octave-2.1.8:3> for i="a b c";i,end | error: invalid type in for loop expression near line 3, column 1 | | This already worked in 2.1.7, but I thing that it is not what is meant: | | octave-2.1.8:9> for m ="a":"d";m,end | m = 97 | m = 98 | m = 99 | m = 100 Try for i = ["foo"; "bar"], i, endfor It works on the columns of a character matrix, for compatibility with Matlab. | Sometimes issuing `hold on' gives a parse error, while `hold "on"' does | not, e.g, if my ~/.octaverc has | | LOADPATH=["~/octave//::" DEFAULT_LOADPATH] This problem was due to a bug in the parser that should be fixed in 2.1.10. Thanks, jwe