help-octave
[Top][All Lists]
Advanced

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

strange for .. end syntax or bug?


From: Francesco Potorti`
Subject: strange for .. end syntax or bug?
Date: Sat, 27 Sep 2008 10:37:34 +0200

In 3.0.1 I get a case where 'end' and 'endfor' behave differently:

octave> for i=1:2 for j=3:4 disp([i j]) end end
parse error:

  syntax error

>>> for i=1:2 for j=3:4 disp([i j]) end end
                                        ^

octave> for i=1:2 for j=3:4 disp([i j]) endfor endfor
   1   3
   1   4
   2   3
   2   4

Is this normal?

-- 
Francesco Potortì (ricercatore)        Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR          Fax:   +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa         Email: address@hidden
(entrance 20, 1st floor, room C71)     Web:   http://fly.isti.cnr.it/


reply via email to

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