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 / 2184
2183  |  2185
Subject: 
Re: Programming the RCX in VB
Newsgroups: 
lugnet.robotics
Date: 
Sun, 3 Jan 1999 02:53:43 GMT
Viewed: 
1514 times
  
Peter,
just relax. We are dealing here with Lego... And if something is not 100%
accurate posted. So what!? It's a newsgroup.

Best
Juergen

Peter Hesketh wrote in message ...
In article <000e01be369d$acc1cce0$53b0acc1@fam.-van-dam>, B van Dam
<bvandam@westbrabant.net> writes
What is the best way to get a random number using VB?

If you really mean "How do I generate a random number within VB" then
click "Help" in VB and search for random.

If you mean "How can RCX code generate a random number" look at Kekoa's
Opcodes Reference and search for random.

If you mean "How can I convert a random number 1 to 32768 into a random
number 5 to 25 using VB", then use:

Random5to25 = 5 + 21 * int(( random1to32768 - 1 ) / 32768 )

If you mean something else, please pose your question in a less
ambiguous manner.
--
Regards - Peter Hesketh, Mynyddbach, Mon.
Forty reasons why a dog is better than a woman: number 16
"Dogs like it when you leave lots of things on the floor."
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics




Message is in Reply To:
  Re: Programming the RCX in VB
 
In article <000e01be369d$acc1cc...-van-dam>, B van Dam <bvandam@westbrabant.net> writes (...) If you really mean "How do I generate a random number within VB" then click "Help" in VB and search for random. If you mean "How can RCX code generate a (...) (26 years ago, 3-Jan-99, to lugnet.robotics)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    
Active threads in Robotics

 
Verified and Trusted Team of Hackers
8 hours ago
Custom Search

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