🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Help needed !!! (pascal program)

#617
From: Christian Iversen
Date: Thu, 19 Apr 2001 12:54
12 lines
1531 bytes
> Wouldn't the results of Random(5) be 0 through 5? If so, then
> Random(5)+1 would yield 1 through 6.
>

No!

Random(x) gives you x possibilities, starting from zero. This is always a
nice way to remember it.. =)

So, for 6 sides, use Random(6)+1, to start at 1.

M.V.H, Christian Iversen
Technical Details
Message-ID: <9bmmql$2iij$1@news.cybercity.dk>
Path: arc1-ca.pugleaf.net!supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!194.255.56.67!newsfeed101.telia.com!news.cybercity.dk!not-for-mail
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 05:48:23 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!194.255.56.67!newsfeed101.telia.com!news.cybercity.dk!not-for-mail
From: "Christian Iversen" <iversen@it.dk>
Newsgroups: comp.lang.pascal.delphi.misc,dk.edb.programmering.pascal
Subject: Re: Help needed !!! (pascal program)
Date: Thu, 19 Apr 2001 14:54:03 +0200
Organization: CyberCity Internet
Lines: 14
Message-ID: <9bmmql$2iij$1@news.cybercity.dk>
References: <987631802.275373@news.l3.wish.net> <3ade7bdb@news.iprimus.com.au> <9bm4o3$qo5$1@porthos.nl.uu.net> <3ADED429.1C9CDC4A@privacy.net>
NNTP-Posting-Host: port45.ds1-arve.adsl.cybercity.dk
X-Trace: news.cybercity.dk 987684501 84563 212.242.195.110 (19 Apr 2001 12:48:21 GMT)
X-Complaints-To: abuse@cybercity.dk
NNTP-Posting-Date: Thu, 19 Apr 2001 12:48:21 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200