VB Number
VB Number
Just like character we can also take a number,integer type variable using “Dim As”.
Just like character we can also take a number,integer type variable using “Dim As”.
Dim int1 As Integer
Dim int2 As Long
The assigning of integer is also same as assigning character.
int1 = 3
int2 = 999.89
int2 = 999.89
There are some numeric operators are given bellow :
“+“–>Add two numbers
“-“–>Subtract two numbers
“*“–>Multiple two numbers
“\“–>Divide two numbers
“^“–>Calculate the power
“MOD“–>Find the Mod value
“-“–>Subtract two numbers
“*“–>Multiple two numbers
“\“–>Divide two numbers
“^“–>Calculate the power
“MOD“–>Find the Mod value
Ex: int1 + int2
Ex: int1 – int2
Ex: int1 * int2
Ex: int1 / int2
Ex: int1 MOD int2
Ex: int1 – int2
Ex: int1 * int2
Ex: int1 / int2
Ex: int1 MOD int2
Operator Precedence :
1.^ operator
2.- operator(indicating negative value)
3.* and / operator
4.\ operator
5.MOD operator
6.+ and – operator
1.^ operator
2.- operator(indicating negative value)
3.* and / operator
4.\ operator
5.MOD operator
6.+ and – operator
Math Function :
Abs():Find the Absolute value
Exp():Find the Exponential of a number
Log():Find the log of any number
Sgn():Sign of the number that pass through it
if >0 passed 1
if =0 passed 0
if <0 passed -1
Sqr():Find the square of the number
Atn():Arctangent of an angle
Cos():Co-Sine of a number
Sin():Sine of number
Abs():Find the Absolute value
Exp():Find the Exponential of a number
Log():Find the log of any number
Sgn():Sign of the number that pass through it
if >0 passed 1
if =0 passed 0
if <0 passed -1
Sqr():Find the square of the number
Atn():Arctangent of an angle
Cos():Co-Sine of a number
Sin():Sine of number
Ex: Abs(10), Abs(-10)
Ex: Exp(number)
Ex: Log(number)
Ex: Sgn(number)
Ex: Sqr(number)
Ex: Atn(number)
Ex: Cos(number)
Ex: Sin(number)
Ex: Exp(number)
Ex: Log(number)
Ex: Sgn(number)
Ex: Sqr(number)
Ex: Atn(number)
Ex: Cos(number)
Ex: Sin(number)
Random function :
Using the random function you can generate any random value. The number will be less than 1
and greater than 0.The code is :
and greater than 0.The code is :
Rnd[(number)]

No comments:
Post a Comment