To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 2158
  Programming the RCX in VB
 
I'm starting on the program for my Mindstorms robot and I had a question. What is the best way to get a random number using VB? At first glance I can find a register that appears to generate a random number between 1 and 32768, but how do I limit (...) (26 years ago, 2-Jan-99, to lugnet.robotics)
 
  Re: Programming the RCX in VB
 
John, here is an example how to create random numbers in VB. In the example below it will generate values between 1 and 6. The statement "Randomize" is initializing the Random Generator. The function "Rnd" is then used to get the random numbers. Dim (...) (26 years ago, 3-Jan-99, to lugnet.robotics)

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR