delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/08/10:37:04

Date: Mon, 8 Mar 1999 17:35:14 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: M Automacao de Bingos e Casas noturnas <mi AT certto DOT com DOT br>
cc: djgpp AT delorie DOT com
Subject: Re: RANDOM
In-Reply-To: <36e3ba29.0@news.americasnet.com>
Message-ID: <Pine.SUN.3.91.990308173241.19701C-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 8 Mar 1999, M Automacao de Bingos e Casas noturnas wrote:

> I have problem using random() in DJGPP
> example
> random(100)
> random return
> 1-30;70-100
> 
> random not return 1-100

You are using the `random' function incorrectly; please consult the 
library reference documentation.

The DJGPP version of `random' is not like the one from Borland: it 
does NOT take an argument, and it returns a random integer between 0 and 
RAND_MAX.  RAND_MAX is defined in the stdlib.h header.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019