Oct: Difference between revisions
Jump to navigation
Jump to search
Created page with "OCT(''number'') '''Description''' OCT returns a string representation of the octal (base 8) value of a number. The required parameter, ''number'', is any valid numeric expre..." |
No edit summary |
||
Line 1: | Line 1: | ||
Oct(''number'') | |||
== Description == | |||
Oct returns a string representation of the octal (base 8) value of a number. The required parameter, ''number'', is any valid numeric expression. If ''number'' is not a whole number, it is rounded to the nearest whole number before being converted. | |||
== Example == | |||
<pre> | <pre> | ||
Rem Oct Example | |||
' | 'Oct returns a number as an octal string | ||
Print "68 in octal:", OCT(68) | |||
Print "1 in octal:", OCT(1) | |||
Print "2605.45 in octal:", OCT(2605.45) | |||
</pre> | </pre> | ||
== Output == | |||
<pre> | <pre> | ||
Line 23: | Line 23: | ||
</pre> | </pre> | ||
== Related Items == | |||
[[hex|HEX]] | [[hex|HEX]] | ||
[[Category:Language Reference]] |
Revision as of 02:37, 17 August 2012
Oct(number)
Description
Oct returns a string representation of the octal (base 8) value of a number. The required parameter, number, is any valid numeric expression. If number is not a whole number, it is rounded to the nearest whole number before being converted.
Example
Rem Oct Example 'Oct returns a number as an octal string Print "68 in octal:", OCT(68) Print "1 in octal:", OCT(1) Print "2605.45 in octal:", OCT(2605.45)
Output
68 in octal: 104 1 in octal: 1 2605.45 in octal: 5055