|
-
Jun 20th, 2000, 04:47 AM
#1
Thread Starter
Addicted Member
hey im trying to random a num,ber in a text box is this how i do it
Text1.Text = 0 <> 100
Text2.Text = 0 <> 100
yeah im kinda new to this
-
Jun 20th, 2000, 04:52 AM
#2
Here's an example of Random numbers.
Code:
Randomize Timer
MyNum = Int(Rnd * 100) + 1
Text1.Text = MyNum
-
Jun 20th, 2000, 06:23 AM
#3
transcendental analytic
rnd returns a "random" value between 0 and 1
rnd -1 will reset the random number generator
randomize will simulate randomization by using that value as a seed to the next random values, using timer as Meg showed will generate different values each time you execute, simulating randomness
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Jun 20th, 2000, 06:50 AM
#4
Also, the + 1 is there so the number can be 100, else, it will only go from 0-99.
-
Jun 20th, 2000, 07:09 AM
#5
transcendental analytic
Meg, what do you prefer option base 1 or 0 when you create arrays? I prefer 0 and i'm annoyed with listview, treeview and classcollection
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|