03-13-2022, 05:45 PM
(This post was last modified: 03-13-2022, 05:49 PM by worcestersource.)
(03-12-2022, 11:06 AM)RandomiserUsr Wrote: Further to this I tried it out on an IF/THEN/ELSEIF and found it didn't like it.
e.g.
IF X=1 THEN
X=2
ELSEIF X=2 AND T< 10 THEN
X=3
END IF
replaced with this:
IF X=1 THEN
X=2
ELSEIF X=2 THEN IF T< 10 THEN
X=3
END IF
I guess it is because it is inside an ELSEIF and gets confused as to what should be done ?
I had some ELSEIF logic in my code and found that the ELSEIF...THEN... IF variant confused the compiler, so this bit of the code still uses ANDs.
Does ELSEIF have any advantages over lots of IFs to test a state? My game reads in the keyboard by peeking an address and then evaluates it.
Steve
Follow my game’s progress here
https://spectrumcomputing.co.uk/forums/v...php?t=6541
https://spectrumcomputing.co.uk/forums/v...php?t=6541