To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 3596
3595  |  3597
Subject: 
Re: random problems...
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 29 Dec 2003 19:10:37 GMT
Viewed: 
3839 times
  
Steve Hassenplug wrote:

I'm having a problem with the random() function in BrickOS.  I keep getting a
return value of zero.

Is there something that needs to be set-up before using the function?

What kind of value does it return?  I've seen documentation that says it returns
a value between MIN_INT and MAX_INT, and another that says place it says it
returns a number up to RAND_MAX.

I'm just using a function like:

int column;
column = random();

Thanks
Steve



How do you know that it return 0 ?

nanobapt



Message is in Reply To:
  random problems...
 
I'm having a problem with the random() function in BrickOS. I keep getting a return value of zero. Is there something that needs to be set-up before using the function? What kind of value does it return? I've seen documentation that says it returns (...) (21 years ago, 29-Dec-03, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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