GLBasic forum

Main forum => Bug Reports => Topic started by: ampos on 2010-Sep-10

Title: IF...THEN bug
Post by: ampos on 2010-Sep-10
The folowing code

Code (glbasic) Select
a=1
IF a=0 THEN PRINT "1",10,10; PRINT "2",10,50
PRINT "3",10,100
SHOWSCREEN;MOUSEWAIT;END


outputs
2
3

When it should be only "3"

Maybe it is not a bug, but the way GLB is, but as old as I know, all basics I have learned, only prints "3"
Title: Re: IF...THEN bug
Post by: Scott_AW on 2010-Sep-10
Only one command can follow a then, otherwise you need them in a if-endif
Title: Re: IF...THEN bug
Post by: Scott_AW on 2010-Sep-11
This is true, you can always condense down the code when parts have been finalized.
Title: Re: IF...THEN bug
Post by: Scott_AW on 2010-Sep-12
I just do it so when I'm scrolling through code it's a little quicker.  Some functions can get long but can easily be condensed so I'm not hunting too long for what I need.