VBScript - Numbers


Advertisements


Description

Number functions help the developers to handle numbers in an efficient way and also helps them to convert their subtypes. It also helps them to make use of the inbuilt mathematical functions associated with VBscript.

Number Conversion Functions

Number functions help us to convert a given number from one data subtype to another data subtype.

Show Examples

Function Description
CDbl A Function, which converts a given number of any variant subtype to double
CInt A Function, which converts a given number of any variant subtype to Integer
CLng A Function, which converts a given number of any variant subtype to Long
CSng A Function, which converts a given number of any variant subtype to Single
Hex A Function, which converts a given number of any variant subtype to Hexadecimal

Number Formatting Functions

The Number formatting functions help the developers to express the given number in a format that they wish to.

Show Examples

Function Description
FormatNumber A Function, which would return an expression formatted as a number
FormatPercent A Function, which would return an expression formatted as a percentage

Mathematical Functions

Mathematical Functions help us to evaluate the mathematical and trigonometrical functions of a given input number.

Show Examples

Function Description
Int A Function, which returns the integer part of the given number
Fix A Function, which returns the integer part of the given number
Log A Function, which returns the natural logarithm of the given number. Negative numbers disallowed
Oct A Function, which returns the Octal value of the given percentage
Hex A Function, which returns the Hexadecimal value of the given number
Rnd A Function, which returns a random number between 0 and 1
Sgn A Function, which returns a number corresponding to the sign of the specified number
Sqr A Function, which returns the square root of the given number. Negative numbers disallowed
Abs A Function, which returns the absolute value of the given number
Exp A Function, which returns the value of e raised to the specified number
Sin A Function, which returns sine value of the given number
Cos A Function, which returns cosine value of the given number
Tan A Function, which returns tan value of the given number


Advertisements