From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a10fc2d4d530dd05 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!feeder.news-service.com!goblin2!goblin.stu.neva.ru!news.net.uni-c.dk!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Tue, 13 Jul 2010 15:17:56 +0200 From: =?ISO-8859-1?Q?Thomas_L=F8cke?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100624 Thunderbird/3.0.5 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Random number generation References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Message-ID: <4c3c6785$0$278$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 83.91.213.86 X-Trace: news.sunsite.dk DXC=2=OC;]j0UDHhAD6WOTE2YEYSB=nbEKnkKh[\g3;[26:K3ZOKe3?:>XADZkco8YM<=KU`JRC]IM5=ETiN`Rf?6ACK X-Complaints-To: staff@sunsite.dk Xref: g2news1.google.com comp.lang.ada:12379 Date: 2010-07-13T15:17:56+02:00 List-Id: On 2010-07-13 14:45, tonyg wrote: > I want to generate a random integer and a random floating point number > between 10 and 30 . I've been looking at previous posts and finding it > a little confusing with many packages, has anyone an already done > example in ada 2005 they can post up? Hey tonyq, I wrote this little tutorial a while ago: http://wiki.ada-dk.org/index.php/The_Dice_Roller_Program As the name suggests, the tutorial centers around a program that rolls dice, and as such it needs to generate some random numbers. The part the does the random stuff can be found here: http://wiki.ada-dk.org/index.php/The_Dice_Roller_Program#dice-random.ads_and_dice-random.adb It's not a very complicated routine, so you should be able to tweak it to match your needs. :o) -- Regards, Thomas L�cke Email: tl at ada-dk.org Web: http:ada-dk.org IRC nick: ThomasLocke