Things learned in lesson:
Ok. This is lesson 2. You probably think you know what an integer is right (mr. imsosmart)? BUT YOU DON'T KNOW HOW TO USE IT IN VB DO YOU??? Ok, here is a little program that will (a) Create an integer and (b) Make it random.
Dim x As Integer
Private Sub Form_Load
x = Rnd * 10
Print x
End Sub
And now we take it apart... again...
Dim is like declaring something. When you
Dim x As Integer
, that means you're declaring x an integer. Rnd means random. and * 10 means from 0 to 10. If you wrote
x = int(Rnd * 10 + 10)
, it means it is a random number from 10 to 20! If you wrote
x = x + 1
, that means x is one more than x (math!). Do you get it now? If yes then continue on to lesson 3.
Goto...