CLng()
This functions changes a number into a long type.
- Read more about CLng()
- Log in or register to post comments
CInt()
Converts a numeric expression into one of an integer data type. In the example below when we changed a double into an integer the fractional portion is rounded.
- Read more about CInt()
- Log in or register to post comments
CDbl()
This conversion will change a number into a number of type double.
- Read more about CDbl()
- Log in or register to post comments
CDate()
This function converst a valid date or time expression that is currently a string into a date type. The expression can contain only the date, only the time or both.
- Read more about CDate()
- Log in or register to post comments
Cbool()
Converst an expression into a boolean. So if the expression is true, i.e. 5 = 5 then it would return True, if it is false, i.e. 5 = 6 then it would return false.
- Read more about Cbool()
- Log in or register to post comments
Asc()
The Asc() function will return the ASCII code for the character. It a string is placed in the function it will only return the ASCII code for the first character.
- Read more about Asc()
- Log in or register to post comments
Int()
The Fix() and Int() functions both remove the fractional part of a number and returns the restulting integer. The difference between the two is that if a number is negative Int() returns the first negative integer less than or equal to the number while Fix returns the first negative integer greater than or equal to the numer.
- Read more about Int()
- Log in or register to post comments
Fix()
The Fix() and Int() functions both remove the fractional part of a number and returns the restulting integer. The difference between the two is that if a number is negative Int() returns the first negative integer less than or equal to the number while Fix returns the first negative integer greater than or equal to the numer.
- Read more about Fix()
- Log in or register to post comments
Randomize()
This is used to create a seed value for the Rnd() function, this helps vary the output of the random seed. You would place a number as the seed, one good option is to use the Second(Now()), this would make sure that your seed is different every time you run the script.
- Read more about Randomize()
- 2 comments
- Log in or register to post comments
Rnd()
The Rnd() function will calculate a random number between 0 and 1. You can then multiple it by the top number of the random interval. So if you wanted a number between 0 and 100 you would multiple it by 100 and also use the Int() function to only capture the integer portion. In the second example I am looking for a number between 1 and 100, in order to do this I use 99 as the top number and add 1 so that if the random number comes out as 0 it will actually be 1 because I added 1 to it.
- Read more about Rnd()
- 3 comments
- Log in or register to post comments