August 2001
Intermediate to advanced
656 pages
18h 5m
English
Oct Function
Microsoft.VisualBasic.Conversion
Oct(number)number
Use: Required
Data Type: Numeric or string capable of conversion to a number
A valid numeric or string expression
String
Returns the octal value of a given number
If number is not already a whole number,
it is rounded to the nearest whole number before being evaluated.
If number is Nothing,
an error occurs.
Oct returns up to 11 octal characters.
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 two statements assign an
octal value to a variable:
lngOctValue1 = &H200 ' Assigns 128 lngOctValue2 = "&O" & Len(dblNumber) ' Assigns 8
Read now
Unlock full access