help-octave
[Top][All Lists]
Advanced

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

space vs semicolon - why syntax error with the former ? (octave-3.4.2)


From: Sergei Steshenko
Subject: space vs semicolon - why syntax error with the former ? (octave-3.4.2)
Date: Tue, 16 Aug 2011 04:25:48 -0700 (PDT)

Hello,

here is a screen session:
"
octave:1> for ii=1:1 ii endfor disp(ii)
parse error:

  syntax error

>>> for ii=1:1 ii endfor disp(ii)
                            ^

octave:1> for ii=1:1 ii endfor;disp(ii)
ii =  1
 1
octave:2>
".

Why is it so 'octave' doesn't accept the first variant ?

With "traditional" 'endfor' on a new line semicolon isn't needed ?
Is there any reason for newline whitespace to be treated differently than space 
whitespace ?

Thanks,
  Sergei.


reply via email to

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