IonicWind Software

IWBasic => General Questions => Topic started by: Parker on November 24, 2008, 10:50:48 PM

Title: Obscure bug with ELSEIF
Post by: Parker on November 24, 2008, 10:50:48 PM
Try the following code:
int i = 1
if i = 1
print "1"
elseif i=2
print "2"
if i=1
endif
else
print "4"
endif


If there is an IF statement inside of any of the ELSEIF branches, it will automatically jump to the ELSE branch. For example, this code prints "1" and then "4". For the moment I've switched over to SELECT/CASE so it's not really crucial, but it shouldn't behave like that is all... thanks.
Title: Re: Obscure bug with ELSEIF
Post by: Ionic Wind Support Team on November 25, 2008, 01:05:06 AM
fixed for next update.

Paul.