Skip to content
Prev 65500 / 398506 Next

simple if...else causes syntax error

roger bos wrote:

            
Parser, try ?"if"


And in ?"if" read the Details section, which tells you:

"[...] In particular, you should not have a newline between } and else 
to avoid a syntax error [...]".


The point is that
    if(A)
        B
is already syntactically complete (else can be omitted), so what the 
parser does not know what follows and has to evaluate ...


Uwe Ligges