Oct$ Function

Language Items List

Definition:

Returns a string that shows the octal value (base 8) of the supplied decimal argument.

Syntax:

Oct[$](number)


Syntax Description


number Any numeric expression.

Details:

The Oct$ function provides a method for representing a decimal number as an octal value. Octal notation is a method of counting using eight digits.

The argument number is rounded to the nearest whole number before it is converted.

To represent octal numbers directly, you can include the prefix &O with the numbers in the proper range. For example, &O377 is the octal notation for decimal 255.

Oct$ returns a String.

See Also:

Hex, Hex$ Functions

Example: