Hello and sorry for bogus title, I just can't explain it simpler in short terms :)
The idea is as follows, there is a variable, incremented from 1 to say 1000.
There is something to be done in each 5, 19, 23, 49 or whatever step of that variable.
On ZX Spectrum, I was using thing like: IF I/21=INT(I/21) THEN xxxx
Here we don't have floating math, so trick with INT won't work. So I came up with the following solution - inside the main variable loop, there's another helper variable, which is incremented by 1, along with main variable. When it reaches predefined value - say 84, we do the thing we have to do, and also reset that variable, so count starts again.
Are there other ways of doing that more simple?
The idea is as follows, there is a variable, incremented from 1 to say 1000.
There is something to be done in each 5, 19, 23, 49 or whatever step of that variable.
On ZX Spectrum, I was using thing like: IF I/21=INT(I/21) THEN xxxx
Here we don't have floating math, so trick with INT won't work. So I came up with the following solution - inside the main variable loop, there's another helper variable, which is incremented by 1, along with main variable. When it reaches predefined value - say 84, we do the thing we have to do, and also reset that variable, so count starts again.
Are there other ways of doing that more simple?