oct

oct — converts numbers into octal form.

Syntax

oct (number)

		

Arguments

number

Any number.

Returns

An integer number in octal format.

Description

This function casts any number to an integer, and returns it in an octal representation. Floating point numbers are truncated.

Example

Gamma> oct(12);
0o14
Gamma> oct(12.86223);
0o14
Gamma> oct(0x3b);
0o73
Gamma> oct(0b0101101);
0o55
Gamma> 
		

See Also

bin, dec, hex