[Tutor] OT: [was] A question about None
Dennis Lee Bieber
wlfraed at ix.netcom.com
Sun Aug 22 14:01:58 EDT 2021
On Sun, 22 Aug 2021 20:29:02 +1200, dn via Tutor <tutor at python.org>
declaimed the following:
>back in the good?bad, old days, wasn't there (a language with) an
>if-statement that went something like:
>
>if expression is positive, or zero, or negative:
> goto positive-branch, zero-branch, negative-branch
FORTRAN Arithmetic IF
(as I recall:
IF (x) 100, 200, 300
...
100 continue
C negative condition logic here
...
200 continue
C zero condition logic here
...
300 continue
C positive condition logic here
In contrast to a computed GOTO (or BASIC ON...GOTO/GOSUB) which
requires positive integer and selects a destination label based on the
value
GOTO (label1, label2, ..., labelN) x
BASIC:
ON x GOSUB label1, label2, ..., labelN
ON y GOTO label1, label2, ..., labelN
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed at ix.netcom.com http://wlfraed.microdiversity.freeddns.org/
More information about the Tutor
mailing list