Spin2 Syntax
Rayman
Posts: 14,646
Now that Chip is working on Spin2 (and maybe before FastSpin solidifies), I have questions...
There was talk about making things like "=>" more like the C ">=".
What is decided on this? Is it maybe better to keep it like Spin1? (even though it is one my main gripes)…
My other main complaint was things like "repeat x from 1000 to 10 step -10".
This looks like it should work, but it doesn't...
There were a million other things... Time for review? (before it's done)
There was talk about making things like "=>" more like the C ">=".
What is decided on this? Is it maybe better to keep it like Spin1? (even though it is one my main gripes)…
My other main complaint was things like "repeat x from 1000 to 10 step -10".
This looks like it should work, but it doesn't...
There were a million other things... Time for review? (before it's done)
Comments
That's different now. Before the loop body, the FROM and TO values are checked for direction. Then, the STEP value is made absolute (positive) and optionally negated if FROM is greater than TO. On each loop iteration, the modified STEP value is added to an in-stack accumulator and the accumulator is copied to the variable, for reference during the REPEAT.