Oct (function)

<< Click to Display Table of Contents >>

Oct (function)

Oct(Num)

Returns a string with the octal representation of the given number.

Num can be any numeric expression; it is rounded to the next integer.

See also: Hex

Example:

Sub Main

 Dim Msg, Num

 Num = InputBox("Enter a number.")

 Msg = "The decimal value " & Num & " is identical to "

 Msg = Msg & "octal" & Oct(Num)

 MsgBox Msg

End Sub