ELSEIF ...THEN;
-
- Posts: 327
- Joined: Wed 04 Apr 2018, 06:36
ELSEIF ...THEN;
There is reference on another group to a command ELIF (of which I have never heard) which supposedly is mirrored by the command ELSEIF followed by a semicolon. Unfortunately I can't find any reference to this command or its syntax or uses in the Help section, even though it is supposedly available for BB4W. Can anyone advise, please? (I have 6.15a)
Re: ELSEIF ...THEN;
It is there, in the documentation of the THEN keyword:
"THEN may be followed immediately by a semicolon (;) to aid translation of the ELSEIF keyword available in some other BASIC dialects, for example:
IF condition1 THEN
PROCone
ELSEIF condition2 THEN;
PROCtwo
ELSEIF condition3 THEN;
PROCthree
ENDIF
As it says there, this facility is primarily intended for use when translating other BASIC dialects to BBC BASIC. Generally it is better to use the CASE TRUE OF construction if writing a program from scratch in BBC BASIC.
Re: ELSEIF ...THEN;
I would add that the ELSEIF ... THEN; usage has been mentioned at this forum before, for example in November 2019 here.