Re: Optional "then" and "do"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Jason Gade wrote:
> Can you give some examples of code doing this? I mean, how optional is it?

Every then and do become optional. It doesn't matter where it is placed.

> I'm mainly wondering whether the parser relies on the keyword "then" or "do"
> being
> between <expr> and <statement>. I don't know enough about the internals
>  to say.

I looked at the internals, and the parser only *asserts* that there are THENs
and DOs
on the correct places. The THENs and DOs does not help the parser at all. 
There is no ambiguity generated too.

> I've never really had a problem with "then" or "do" (except occasionally
> forgetting
> "do") but I also don't have a problem with removing them if there is no major
> effect.

Oh yes, I forgot to mention that. Besides being mixed up between THEN and DO,
occassionally I forgot to write that. What a.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu