Method: Oct for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Oct for VBS
Method: Oct for VBS
Specifies the octal display of a number. You can enter an octal number directly by inserting the characters &O in front of the octal number.
vOct = Object.Oct(number)
| Object | VBS Object with this method. You do not need to specify this object. |
| number | Variant Specifies any expression. If number is not an integer, the Oct method first rounds the number value. |
| vOct | Variant Receives a character string in octal notation. |
The following example returns the octal display of various numbers:
Call MsgBox(Oct(4)) ' Returns 4. Call MsgBox(Oct(31)) ' Returns 37 Call MsgBox(Oct(4711)) ' Returns 11147