Loops/While: Difference between revisions
→{{header|Octave}}
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
|||
Line 2,350:
The usage of the type int32 is not convenient, since the math is done floating point, then rounding to integer, so that 1/2 will be always 1 and never 0.
=={{header|Odin}}==
Odin only has one loop type: for
<lang Odin>
package main
import "core:fmt"
main :: proc() {
for i := 1024 ; i > 0 ; i /= 2 {
fmt.println(i)
}
}
</lang>
=={{header|Oforth}}==
|