From bug-octave-request at bevo dot che dot wisc dot edu Fri Nov 6 12:57:06 1998 Subject: more 2.1.8 problems From: Joao Cardoso To: bug-octave Date: Fri, 6 Nov 1998 12:56:51 -0600 (CST) Hi, This example from the ChangLog file does not work octave-2.1.8:1> function f (...) > for i = 1:nargin stdout << "argn(" << i << ") = `" << deblank (argn(i,:)) \ << "' and its value is " << va_arg () << "\n"; endfor endfunction f (1+2, "foo", sin (pi/2)) > stdout << "argn(" << i << ") = `" << deblank (argn(i,:)) \ > << "' and its value is " << va_arg () << "\n"; > endfor > endfunction octave-2.1.8:2> f (1+2, "foo", sin (pi/2)) argn(1) = `error: `argn' undefined near line 3 column 57 error: evaluating index expression near line 3, column 57 error: evaluating argument list element number 1 error: evaluating index expression near line 3, column 48 error: evaluating binary operator `<<' near line 3, column 45 error: evaluating binary operator `<<' near line 4, column 18 error: evaluating binary operator `<<' near line 4, column 43 error: evaluating binary operator `<<' near line 4, column 56 error: evaluating for command near line 2, column 9 error: called from `f' 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 Sometimes issuing `hold on' gives a parse error, while `hold "on"' does not, e.g, if my ~/.octaverc has LOADPATH=["~/octave//::" DEFAULT_LOADPATH] then after starting octave-2.1.8, LOADPATH = ~/octave//::.:/usr/local/libexec/octave/site/oct/i386-pc-sco3.2v5.0.4//:/usr/local/share/octave/site/m//:/usr/local/libexec/octave/2.1.8/oct/i386-pc-sco3.2v5.0.4//:/usr/local/share/octave/2.1.8/m// octave-2.1.8:1> help help parse error: >>> help help ^ octave-2.1.8:1> help "help" help is a builtin text-function help [-i] [topic ...] I used to set my LOADPATH in .octaverc as: LOADPATH=["~/octave//:" LOADPATH] now I am using LOADPATH="/u/jcard/octave//::" Is this correct? I have tried several combinations nad this one *seems* to work. Thanks, Joao -- Joao Cardoso | e-mail: jcardoso at inescn dot pt INESC, R. Jose Falcao 110 | tel: + 351 2 2094322 4050 Porto, Portugal | fax: + 351 2 2008487