IF THEN bug? (no showstopper)

Previous topic - Next topic

Moru

Code (glbasic) Select
IF a = TRUE THEN
DEBUG "hello"


This no longer makes the compiler complain, it used to, right? No showstopper, just caused some confusion tonight :-)

Quentin

interesting.
Just tested it, but the compiler will handle this as two separate command lines. Means line "DEBUG "hello" is executed in any case, even if a = FALSE
I'm not sure if this worked before.

Scott_AW

Last version I have is 7.242(i think) and that would for sure crash if I left an open THEN.  I try not to use it either.

Current Project, Orbital Contract Defense
http://gamejolt.com/games/adventure/code-name-ocd/9887/

BlackShadow now open source/resource(requires duke3d)
http://gamejolt.com/games/adventure/black-shadow-3d/9885/

FutureCow

I put in a request ages ago that THEN become an optional keyword for multi line conditions. Gernot wasn't keen on the idea, so I doubt it's been implemented.

Kitty Hello

IF xxx
   yyy
ENDIF

_OR_

IF xxx THEN yyy

No then for multiline IF

Quentin

that's clear, but it wasn't the question :)
We were just wondering about that a command like
Code (glbasic) Select

IF a = TRUE THEN

without anything following the THEN doesn't cause an error

Kitty Hello

Because newline and ; are a command in my parser. I'll add an error. Doh!