Page 2 of 2
Re: Super BASIC coding style for Minerva
Posted: Tue Feb 28, 2017 10:18 am
by tcat
Hi,
Interestingly `ELSEIF' appeared in `Oberon' Language as a single word (Pascal / Modula had it as two words `ELSE IF'). This simplifies `Oberon' language implementation while offering object features at no extra big expense, unlike c++.
Tomas
Re: Super BASIC coding style for Minerva
Posted: Tue Feb 28, 2017 1:57 pm
by tofro
I'm a bit at loss on where you guys seem to see a difference (apart from the <space> character) between an ELSEIF and an ELSE IF?
Tobias
Re: Super BASIC coding style for Minerva
Posted: Tue Feb 28, 2017 8:20 pm
by swensont
> I'm a bit at loss on where you guys seem to see a difference (apart from the <space> character) between an ELSEIF and an ELSE IF?
Well, ELSEIF and ELSE IF are different. In Bourne/Korn shell, IF statements don't have END IF, but FI (IF backwards) and CASE ends with ESAC (CASE backwards). Both of these drive me crazy and I prefer C shell where IF ends with ENDIF.
We all have our pet peeves when it comes to languages and structures.
Tim Swenson
Re: Super BASIC coding style for Minerva
Posted: Tue Feb 28, 2017 8:48 pm
by tcat
Hi,
IF [expression] THEN [command]
ELSIF [expression] THEN [command]
ELSIF [expression] THEN [command]
...
ELSE [command]
END.
ELSEIF is an extra word to ELSE in the `Oberon' construct so the lexical analyser has easier job.
Tomas
Re: Super BASIC coding style for Minerva
Posted: Tue Feb 28, 2017 9:00 pm
by tofro
tcat wrote:
ELSEIF is an extra word to ELSE in the `Oberon' construct so the lexical analyser has easier job.
That might or might not be easier, depending on the implementation of the lexer.
ql_freak, however, was pointing out a missing ELSEIF as a "missing feature of the S*Basic language". That's what I object to.
Tobias