All Functions

oct - octal values

The octal function generates random base-8 values or converts decimal values to octal values depending on the input parameters.

The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Octal numerals can be made from binary numerals by grouping consecutive binary digits into groups of three (starting from the right).

Source: http://en.wikipedia.org/wiki/Octal

Usage(s)

oct ( $decimal ) Returns the octal value for the given decimal
oct ( $minimum , $maximum ) Returns random octal values in the decimal range $minimum to $maximum

Parameter(s)

$decimal The decimal value to be converted to octal
$minimum The minimum decimal value range.
$maximum The maximum decimal value range.

Example(s)

Converting decimal values to octal values

oct(8) = 10
oct(9) = 11
oct(16) = 20
oct(8000) = 17500

Generating random octal values

oct(8,16) = This will never return an 18 nor 19.

14
10
20
11
15
14
16
10
13
16
12
15
14
16
11
20
14
20
20
11

See also

int - number hex - hexadecimal value bin - binary value