(no title)
BariumBlue | 2 years ago
GOTO is super unambiguous and probably a better introduction to program control flow while they get used to manipulating and juggling variables around
BariumBlue | 2 years ago
GOTO is super unambiguous and probably a better introduction to program control flow while they get used to manipulating and juggling variables around
tialaramex|2 years ago
Computed GOTO is often possible in BASICs. In one sense that's awesome, this is a very powerful technique, but in practice it's so unstructured that you shouldn't ever use it so why even offer it?
"That's how the machine works". Yes it is, which is why we don't write raw machine code when we can.
ddingus|2 years ago
When I used them, I would use boolean in the math to insure the input value was bounded properly.
X = (Y > 5) and Y (for systems setting true to -1 all bits set)
X = Y * (Y > 5) (for systems setting true to just the value 1)
Basically an in-line compare where the actual numeric value result of the comparison is used in a math expression rather than as an input to an if-then construct.
And these two ideas map directly to assembly language, which given the speed of the machines back in the day, made sense. People were going to be using assembly sooner or later.