Retrogamecoding(.org) > Other Languages

Icon

<< < (2/2)

Tomaaz:
It's a part of majority of languages?

phred:
In this instance probably not much since I do see a case statement, but to me either is cleaner looking than a list of if-then's.

ZXDunny:
Well as I understand it - and correct me if I'm wrong - but BASIC is generally built (for IF) with IF <condition> THEN <statement> ELSE <statement> and since IF itself constitutes a statement, then IF x THEN y ELSE IF z THEN a etc etc is perfectly fine?

Tomaaz:

--- Quote from: phred on October 31, 2018, 02:39:40 PM ---In this instance probably not much since I do see a case statement, but to me either is cleaner looking than a list of if-then's.

--- End quote ---

Case statement can't replace every else if scenario.


--- Quote from: ZXDunny on October 31, 2018, 02:58:52 PM ---Well as I understand it - and correct me if I'm wrong - but BASIC is generally built (for IF) with IF <condition> THEN <statement> ELSE <statement> and since IF itself constitutes a statement, then IF x THEN y ELSE IF z THEN a etc etc is perfectly fine?

--- End quote ---

Unless y and a are complex multi-statement blocks.

Navigation

[0] Message Index

[*] Previous page

Go to full version