Name
Oct Function
Syntax
Oct(number)numberUse: Required
Data Type: Numeric or String
Number or string representation of a number to convert.
Return Value
A String.
Description
Returns a string containing the octal representation of a given number.
Rules at a Glance
If
numberisn’t already a whole number, it’s rounded to the nearest whole number before being evaluated.If
numberisNull, Oct returnsNull.If
numberis the specialEmptyvariant, Oct returns 0 (zero).Oct returns up to 11 octal characters.
Programming Tips and Gotchas
You can also use literals in your code to represent octal
numbers by appending &O to
the relevant octal value. For example, 100 decimal has the octal
representation &O144. The
following statement assigns an octal value to a variable:
lngOctValue1 = &o200 ' Assigns 128See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access