Count in octal: Difference between revisions

Content added Content deleted
Line 2,697: Line 2,697:


==={{header|PL/I-80}}===
==={{header|PL/I-80}}===
If you only need to count, and aren't bothered by the leading zeroes in the output, this will do the trick simply and with a minimum of fuss.
If you only need to count, and aren't bothered by leading zeroes in the output, this will do the trick simply and with a minimum of fuss.
<lang pl/i>
<lang pl/i>
octal_count:
octal_count:
Line 2,735: Line 2,735:
177777
177777
</pre>
</pre>
But a general purpose function to return the octal representation of an integer value may prove more useful in a variety of contexts.
But a general purpose function to return the octal representation of an integer value as a string (similar to the OCT$ function in many BASICs) may prove more useful.<lang pl/i>
<lang pl/i>
octal_count:
octal_count:
procedure options (main);
procedure options (main);