OCT2DEC (Number) OCT2DEC (Number)

Number

Text Text

An octal number.

Returns

Number Number

A decimal number.

Converts an octal number to a decimal number. Negative numbers are written as ten digits in two's complement form. Also consider using the more general function DECIMAL. Perform the reverse conversion using DEC2OCT.

Examples

OCT2DEC ("5")
OCT2DEC ("5")

Returns 5.

OCT2DEC ("173")
OCT2DEC ("173")

Returns 123.

DECIMAL ("173", 8)
DECIMAL ("173"; 8)

Returns 123.

OCT2DEC ({ "5", "173" })
OCT2DEC ({ "5"; "173" })

Returns the array { 5, 123 }{ 5; 123 }.

OCT2DEC ("7777777777")
OCT2DEC ("7777777777")

Returns -1, as the ten-digit octal number is interpreted in two's complement form.

fxEngine Shell Want this in your own terminal? A standalone version is coming. Get notified.
Loading fxEngine Shell