Count in octal: Difference between revisions
Content added Content deleted
(→{{header|AutoHotkey}}: AutoHotkey example added) |
|||
Line 68: | Line 68: | ||
</pre> |
</pre> |
||
=={{header|AutoHotkey}}== |
|||
<lang AHK>DllCall("AllocConsole") |
|||
Octal(int){ |
|||
While int |
|||
out := Mod(int, 8) . out, int := int//8 |
|||
return out |
|||
} |
|||
Loop |
|||
{ |
|||
FileAppend, % Octal(A_Index) "`n", CONOUT$ |
|||
Sleep 200 |
|||
}</lang> |
|||
=={{header|AWK}}== |
=={{header|AWK}}== |
||
The awk extraction and reporting language uses the underlying C library to provide support for the printf command. This enables us to use that function to output the counter value as octal: |
The awk extraction and reporting language uses the underlying C library to provide support for the printf command. This enables us to use that function to output the counter value as octal: |