General information
Category:
Coding, syntax & commands
Thanks.
John
>>OK, I feel like I'm looking at a repeating # problem on an IQ test. I understand the concept, but why multiply by 25 if rand() is even or by 9 if not?
>>
>
>Ok.. ASCII a to z is chr(97) to chr(122) and since rand() returns a number between 0 and 1, then rand()* 25 will be a number between 0 and 25. 97+25 = 122. So when lnCnt is 1 or for all random even times, it will create a random letter in the range of a to z. Else it will do it in the range of chr(48) to chr(57) which is 0 to 9.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only