Google

Sunday, January 13, 2008

Vb Script Tutorial

4. Conversion Functions

Function
Description
Asc
Converts the first letter in a string to ANSI code
CBool
Converts an expression to a variant of subtype Boolean
CByte
Converts an expression to a variant of subtype Byte
CCur
Converts an expression to a variant of subtype Currency
CDate
Converts a valid date and time expression to the variant of subtype Date
CDbl
Converts an expression to a variant of subtype Double
Chr
Converts the specified ANSI code to a character
CInt
Converts an expression to a variant of subtype Integer
CLng
Converts an expression to a variant of subtype Long
CSng
Converts an expression to a variant of subtype Single
CStr
Converts an expression to a variant of subtype String
Hex
Returns the hexadecimal value of a specified number
Oct
Returns the octal value of a specified number

5. Format Functions
Top

Function
Description
FormatCurrency
Returns an expression formatted as a currency value
FormatDateTime
Returns an expression formatted as a date or time
FormatNumber
Returns an expression formatted as a number
FormatPercent
Returns an expression formatted as a percentage

6. Math Functions
Top

Function
Description
Abs
Returns the absolute value of a specified number
Atn
Returns the arctangent of a specified number
Cos
Returns the cosine of a specified number (angle)
Exp
Returns e raised to a power
Hex
Returns the hexadecimal value of a specified number
Int
Returns the integer part of a specified number
Fix
Returns the integer part of a specified number
Log
Returns the natural logarithm of a specified number
Oct
Returns the octal value of a specified number
Rnd
Returns a random number less than 1 but greater or equal to 0
Sgn
Returns an integer that indicates the sign of a specified number
Sin
Returns the sine of a specified number (angle)
Sqr
Returns the square root of a specified number
Tan
Returns the tangent of a specified number (angle)

No comments: