🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #612

Re: Help needed !!! (pascal program)

#612
From: CFB Software
Date: Fri, 20 Apr 2001 00:26
60 lines
3194 bytes
Bill,

Thanks for your defence but I'm afraid M.H. Avegaart is correct. Random(n)
returns the result 0 .. n - 1. The problem wasn't quite as simple as some
seemed to think.

Chris Burrows
CFB Software
http://www.cfbsoftware.com.au

"James Roberts" <me@privacy.net> wrote in message
news:3ADED429.1C9CDC4A@privacy.net...
> Wouldn't the results of Random(5) be 0 through 5? If so, then
> Random(5)+1 would yield 1 through 6.
>
> Bill Braun
>
>
> "M.H. Avegaart" wrote:
> >
> > Last time I checked dice had 6 sides (at least the most common ones), so
the
> > code should be:
> >
> > DieThrow := Random(6) + 1;
> >
> > "CFB Software" <info@cfbsoftware.com.au> schreef in bericht
> > news:3ade7bdb@news.iprimus.com.au...
> > > Randomize;  // Call once only to initialise
> > > ....
> > > ....
> > > DieThrow := Random(5) + 1;
> > >
> > > Each execution of this statement will assign a random number in the
range
> > 1
> > > to 6 to DieThrow if that is what you are trying to do,
> > >
> > > Chris Burrows
> > > CFB Software
> > > http://www.cfbsoftware.com.au
> > >
> > > "Maarten" <mvddonk@wish.nl> wrote in message
> > > news:987631802.275373@news.l3.wish.net...
> > > > Can anyone help me with this program i'm trying to make !?
> > > > The idea of the program is to simulatie the throwing of a die.
> > > > Can anyone help me?
> > > > Thanks !!
> > > >
> > > > -------------------DUTCH-------------------
> > > > Kan iemand mij helpen met het maken van een programma !?
> > > > Het idee is om een programma te maken wat het gooien van een
dobbelsteen
> > > > simuleerd.
> > > > Alvast bedankt !!
> > > > -------------------DUTCH-------------------
> > > >
> > > >
> > >
> > >
Technical Details
Message-ID: <3adf8258@news.iprimus.com.au>
Path: arc1-ca.pugleaf.net!supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!howland.erols.net!portc.blue.aol.com.MISMATCH!portc01.blue.aol.com!news.stealth.net!intgwpad.nntp.telstra.net!news1.optus.net.au!optus!news0.optus.net.au!news.iprimus.com.au!203.134.19.135
References: <987631802.275373@news.l3.wish.net> <3ade7bdb@news.iprimus.com.au> <9bm4o3$qo5$1@porthos.nl.uu.net> <3ADED429.1C9CDC4A@privacy.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10baee,efc23ac230e573b5
X-Google-Attributes: gid10baee,public
X-Google-Thread: 1097b9,efc23ac230e573b5
X-Google-Attributes: gid1097b9,public
X-Google-ArrivalTime: 2001-04-19 17:28:10 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!howland.erols.net!portc.blue.aol.com.MISMATCH!portc01.blue.aol.com!news.stealth.net!intgwpad.nntp.telstra.net!news1.optus.net.au!optus!news0.optus.net.au!news.iprimus.com.au!203.134.19.135
From: "CFB Software" <info@cfbsoftware.com.au>
Newsgroups: comp.lang.pascal.delphi.misc,dk.edb.programmering.pascal
References: <987631802.275373@news.l3.wish.net> <3ade7bdb@news.iprimus.com.au> <9bm4o3$qo5$1@porthos.nl.uu.net> <3ADED429.1C9CDC4A@privacy.net>
Subject: Re: Help needed !!! (pascal program)
Lines: 62
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
X-Original-NNTP-Posting-Host: 203.134.19.135
Message-ID: <3adf8258@news.iprimus.com.au>
X-Original-Trace: 20 Apr 2001 10:27:04 +1000, 203.134.19.135
Date: Fri, 20 Apr 2001 09:56:52 +0930
NNTP-Posting-Host: 203.134.64.67
X-Trace: news0.optus.net.au 987726489 203.134.64.67 (Fri, 20 Apr 2001 10:28:09 EST)
NNTP-Posting-Date: Fri, 20 Apr 2001 10:28:09 EST
Organization: CWO Customer - reports relating to abuse should be sent to abuse@cwo.net.au