Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Testing a variable within a range
#12
(03-14-2022, 09:49 AM)boriel Wrote: Just for the record Rolleyes (as someone else might find this thread useful):
Code:
IF/ELSEIF .. THEN <something>
does not require END IF, however
Code:
THEN
  <something>
END IF : REM required
THEN at the end of line starts a block which must be closed with END IF.

In the later case you're using
Code:
ELSEIF X = 2 THEN IF T<10 THEN
  X = 3
END IF
And this is OK, but the END IF if closing the IF T < 10 condition (the ELSEIF ... THEN if followed by such IF, not by an End Of Line, hence no END IF is needed to close it).

Okay- I have revisited the code again and is compiling as normal, I have no idea what happened.

Thanks again Boriel
Reply


Messages In This Thread
RE: Testing a variable within a range - by boriel - 01-28-2022, 11:19 AM
RE: Testing a variable within a range - by boriel - 03-13-2022, 11:38 AM
RE: Testing a variable within a range - by boriel - 03-14-2022, 08:50 AM
RE: Testing a variable within a range - by boriel - 03-14-2022, 09:49 AM
RE: Testing a variable within a range - by RandomiserUsr - 03-25-2022, 09:59 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)