Anonymous user
Loops/For with a specified step: Difference between revisions
m
→{{header|Sather}}: stepto! (digging sather lib src to know methods I do not find documented elsewhere!)
(→{{header|Scheme}}: ++ sather) |
m (→{{header|Sather}}: stepto! (digging sather lib src to know methods I do not find documented elsewhere!)) |
||
Line 379:
=={{header|Sather}}==
See [[Loops/For#Sather]]: the implementation for <code>for!</code> allows to specify a step, even though the built-in <code>stepto!</code> can be used; an example of usage could be simply:
<lang sather> i :INT;
loop
i := for!(1, 50, 2);
-- OR
-- i := 1.stepto!(50, 2);
#OUT + i + "\n";
end;</lang>
|