Thread: Random Numbers
View Single Post
  #4   Spotlight this post!  
Unread 18-01-2004, 20:53
Dave Flowerday Dave Flowerday is offline
Software Engineer
VRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 1995
Location: North Barrington, IL
Posts: 1,366
Dave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond reputeDave Flowerday has a reputation beyond repute
Re: Random Numbers

Quote:
Originally Posted by Astronouth7303
Ok, I tried that. Get this: ...\user_routines.c:267:Warning [2058] call of function without prototype:

Code:
  rnd = Rand();
In C (and C++), function calls are case sensitive. Change "Rand()" to "rand()" and you should be all set.

Quote:
Code:
pwm01=pwm03=Random;
pwm02=pwm04=Random;
Whenever you need to call a function, you need to include the parentheses, even if there aren't any arguments. So your code should look like:
Code:
pwm01=pwm03=Random();
pwm02=pwm04=Random();