Returns a FixStr (String) value representing the octal value of a number.
Oct[$]([number]) |
The optional number argument is any valid numeric expression or string expression in the range from -2147483648 to 2147483647. If this argument is omitted, is a non-initialized variable, or Null, the function returns 0.
If number is not already a whole number, it's rounded to the nearest whole number before being evaluated. If number is Empty or Null, the function returns 0. For any other number the Hex function returns up to 11 octal symbols.
You can represent octal numbers directly by preceding numbers in the proper range with &O. For example, &O10 represents decimal 8 in octal notation.
The Oct$ form returns String values. The Oct form returns FixStr values.
Dim MyOct MyOct = Oct(4) ' Returns 4. MyOct = Oct(8) ' Returns 10. MyOct = Oct(459) ' Returns 713. |
See Also |
Bin Function, Hex Function, Type Conversion Functions |