Count in octal: Difference between revisions

(Example added in PDP-10 assembly (MACRO-10/TOPS-20).)
Line 2,289:
}
?></lang>
 
=={{header|Picat}}==
Ways to convert to octal numbers:
* <code>to_oct_string(N)</code>
* <code>to_radix_string(N,8)</code>
* <code>printf("%o\n",N)</code>
 
 
<lang Picat>go =>
gen(N),
println(to_oct_string(N)),
fail.
 
gen(I) :-
gen(0, I).
gen(I, I).
gen(I, J) :-
I2 is I + 1,
gen(I2, J).</lang>
 
{{out}}
<pre>0
1
2
3
4
5
6
7
10
11
...
17615737040105402212262317777777776
17615737040105402212262317777777777
17615737040105402212262320000000000
17615737040105402212262320000000001
17615737040105402212262320000000002
<Ctrl-C></pre>
 
 
=={{header|PicoLisp}}==
495

edits