help-octave
[Top][All Lists]
Advanced

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

Re: space vs semicolon - why syntax error with the former ? (octave-3.4.


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


--- On Tue, 8/16/11, Ben Abbott <address@hidden> wrote:

> From: Ben Abbott <address@hidden>
> Subject: Re: space vs semicolon - why syntax error with the former ? 
> (octave-3.4.2)
> To: "Sergei Steshenko" <address@hidden>
> Cc: address@hidden
> Date: Tuesday, August 16, 2011, 5:24 AM


> Back to your example, there is more than one interpretation
> of ...
> 
>     for ii = 1:1 ii endfor disp ii ;
> 
> Ben
> 

'endfor' "balances" 'for', i.e. the parser may forget _completely_ (except
for input text pointer position) about the whole 'for' loop, and after
that parse the 'disp' (in this case) part.

I.e. I still don't see how different interpretation can be present in
this case - to me it looks like the 'for' loop statement is unambiguously
over, and no special separator (e.g. ';') is necessary - simply
because of 'endfor' detection.

Regards,
  Sergei.



reply via email to

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