Oct Function


Oct Function

Class

Microsoft.VisualBasic.Conversion

Syntax

     Dim result As String = Oct  (number) 


number (required; numeric or string value)

A number, or a string that can be interpreted as a number. Nonintegral numbers are rounded before conversion.

Description

The Oct function returns a string that represents the octal value of a numeric expression.

Usage at a Glance

  • Nonintegral numbers are rounded before conversion to octal format. An empty value results in "0." A value of Nothing generates an error.

  • The octal result is limited to 22 digits. Numbers larger than this limit result in an overflow error.

  • If the source value is a string, it may appear in octal format. Such strings begin with the standard "&O" octal prefix for Visual Basic, as in "&O10" for a decimal value of 8.

Version Differences

The Visual Basic 6 version of the Oct function only handled up to 11 octal digits. The .NET version handles up to 22 digits.

See Also

Hex Function




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net