Oct Function


Oct( num )

Returns the octal value of the decimal parameter.

Oct returns a string.

Example:

    Sub Main()

        Dim Msg, Num   ' Declare variables.

        Num = InputBox("Enter a number.")   ' Get user input.

        Msg = Num & " decimal is &O"

        Msg = Msg & Oct(Num) & " in octal notation."

        MsgBox Msg   ' Display results.

    End Sub


Related Topic:

Hex Function