Oct

From NSB App Studio
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function is for BASIC compatibility. It is not available in pure JavaScript projects. 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 (Basic)

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

Related Items

Hex