From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: rand and random Date: Sat, 30 Oct 1999 23:26:06 -0700 Organization: Harvey Mudd College Lines: 20 Message-ID: <381BE0FE.88C50410@hmc.edu> References: NNTP-Posting-Host: mercury.st.hmc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: nntp1.interworld.net 941351198 74930 134.173.45.219 (31 Oct 1999 06:26:38 GMT) X-Complaints-To: usenet AT nntp1 DOT interworld DOT net NNTP-Posting-Date: 31 Oct 1999 06:26:38 GMT X-Mailer: Mozilla 4.61 [en] (X11; U; Linux 2.2.14pre3 i586) X-Accept-Language: en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Damian Yerrick wrote: > > On Sat, 30 Oct 1999 18:30:03 -0700, > "Al Morgan" wrote: > > > How does one use the rand(), and random() functions? > > Read the libc docs. > > But I know you're busy: > > rand() will give a number between 0 and 32,767. ^^^^^^ 2147483647 (i.e. largest possible int) is the correct number for DJGPP's rand(). For portability, use the macro RAND_MAX. -- Nate Eldredge neldredge AT hmc DOT edu