To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.handyboardOpen lugnet.robotics.handyboard in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / Handy Board / 7905
7904  |  7906
Subject: 
minor update to new random.c
Newsgroups: 
lugnet.robotics.handyboard
Date: 
Wed, 28 Jun 2000 19:01:36 GMT
Original-From: 
Richard Drushel <drushel@apk.net&saynotospam&>
Viewed: 
1136 times
  
Field testing in a real class is the best way to get bugs out of
code :-)  My summer robotics class discovered a couple of "misfeatures"
in my new random.c pseudo-random number generator library:

(1) the rndrangei(), rndrangel(), and rnd() functions could not return
the upper bound of the range.  E.g., rndrangei(0,2,1) would return
only 0 or 1, never 2.

(2) Fred Martin's original random() function is already defined in
lib_hb.c, so Handy Board users would get a "function already
defined" error when trying to load random.c.  (The 6.270 board
standard library, lib_r22.c, doesn't have a random() function,
so I, running a 6.270-based course, included it in my random.c.)

I have fixed these errors and created a revised version 2.1 of
random.c.  It is available via anonymous FTP at:

ftp://junior.apk.net/pub/users/drushel/rfd-ic/random.c

Please update to the new version if you're using random.c.  If you edited
your lib_hb.c to remove random() to avoid the duplicate definition, you'll
have to put it back...fortunately, I just commented out the code in
random.c, so you can cut/paste it back in.

As always, let me know if you have any problems or find any bugs.

*Rich*
--
Richard F. Drushel, Ph.D.            | "Aplysia californica" is your taxonomic
Department of Biology, Slug Division | nomenclature.  /  A slug, by any other
Case Western Reserve University      | name, is still a slug by nature.
Cleveland, Ohio  44106-7080  U.S.A.  |     -- apologies to Data, "Ode to Spot"



1 Message 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