[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: |
CdeMills |
Subject: |
Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2) |
Date: |
Tue, 16 Aug 2011 10:03:57 -0700 (PDT) |
Sergei Steshenko-2 wrote:
>
> --- On Tue, 8/16/11, Ben Abbott <address@hidden> wrote:
>
>
>> 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.
>
>
Sorry, but taking your reasoning literally is bogus: let's consider
if (0>1) disp('Problem'); end; disp(36)
if you take for granted that the 'end' close the expression, then then
previous line should be equivalent to
; disp(36)
which is a syntactically incorrect.
Regards
Pascal
--
View this message in context:
http://octave.1599824.n4.nabble.com/space-vs-semicolon-why-syntax-error-with-the-former-octave-3-4-2-tp3746937p3747777.html
Sent from the Octave - General mailing list archive at Nabble.com.
- space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Ben Abbott, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Ben Abbott, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2),
CdeMills <=
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Przemek Klosowski, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Sergei Steshenko, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Jordi Gutiérrez Hermoso, 2011/08/16
- Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), Jordi Gutiérrez Hermoso, 2011/08/16
Re: space vs semicolon - why syntax error with the former ? (octave-3.4.2), CdeMills, 2011/08/17