Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Testing a variable within a range
#12
(2022-03-14, 10: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 - 2022-01-28, 12:19 PM
RE: Testing a variable within a range - by boriel - 2022-03-13, 12:38 PM
RE: Testing a variable within a range - by boriel - 2022-03-14, 09:50 AM
RE: Testing a variable within a range - by boriel - 2022-03-14, 10:49 AM
RE: Testing a variable within a range - by RandomiserUsr - 2022-03-25, 10:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)