Tour : VBScript - Numbers Function

Step 1. What is the number Function?
Step 2. VBScript supported "Number Conversion Functions"
Step 3. VBScript supported "Number Formatting Functions"
Step 4. VBScript supported "Mathematical Functions"
Step 5. Visit GoLearningBus.Com for more "www.vbsedit.com" training

1.What is the number Function?

VB Script also provide some inbuilt Number Function. This Number Function help us to process and manage the number type variables easily. By using this inbuilt Number Function we can easily convert the one sub-type variables into the other sub-type. All the VBscript Number Functions divided into below category. 1) Number Conversion Functions, 2) Number Formatting Functions, 3) Mathematical Functions. We will discuss all VBscript supported Number Functions in detail in next steps.

Go to Toparrow-1

2.VBScript supported "Number Conversion Functions"

Number Functions help us to convert a given number from one data sub-type to another data sub-type. VBScript support the following "Number Conversion functions" : 1) CDbl 2) CInt 3) CLng 4) CSng 5) Hex
Syntax :- Variable_name = Conversion_function_name(expression) One liner detail about function is given here in the screenshot.

Go to Toparrow-1

3.VBScript supported "Number Formatting Functions"

By using the "Number Formatting Function" we can easily convert the number variable from one format to another required format. Syntax :- variablename = Format_function_Name(Expression[,NumberDigAfterDec[,LeadingDig[,UseParForNegNum[,GroupDigits]]]]) To know more about syntax attributes read the comment that is shown in screenshot. VBScript support the following "Number Formatting Functions" : 1) FormatNumber, 2) FormatPercent. In this example we show how to use both function with their output value for given specified value.

Go to Toparrow-1

4.VBScript supported "Mathematical Functions"

Mathematical Functions help us to evaluate the mathematical and trigonometrical functions of a given input number. Syntax :- variablename = Mathematical_function_Name(Expression) VBScript support the following "Mathematical Functions" : 1) Int, 2) Fix, 3) Log, 4) Oct, 5) Hex, 6) Rnd, 7) Sgn, 8) Sqr, 9) Abs, 10) Exp, 11) Sin, 12) Cos, 13) Tan

Go to Toparrow-1

5.Visit GoLearningBus.Com for more "www.vbsedit.com" training

Visit GoLearningBus.Com for more "www.vbsedit.com" guided tours and training. For only $10 you can access more than 300 apps for a lifetime of learning and training.

Go to Toparrow-1