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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c7fc42d2c6a0eedc,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-04-02 05:29:51 PST Path: archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.icl.net!newsfeed.fjserv.net!feed.news.nacamar.de!news.belwue.de!news.uni-stuttgart.de!not-for-mail From: Peter Hermann Newsgroups: comp.lang.ada Subject: Ada2005 random Date: Wed, 2 Apr 2003 13:27:32 +0000 (UTC) Organization: Comp.Center (RUS), U of Stuttgart, FRG Message-ID: NNTP-Posting-Host: sinus.csv.ica.uni-stuttgart.de X-Trace: news.uni-stuttgart.de 1049290052 8821 129.69.118.70 (2 Apr 2003 13:27:32 GMT) X-Complaints-To: news@news.uni-stuttgart.de NNTP-Posting-Date: Wed, 2 Apr 2003 13:27:32 +0000 (UTC) User-Agent: tin/1.5.12-20020311 ("Toxicity") (UNIX) (Linux/2.4.20-xfs-preempt (i686)) Xref: archiver1.google.com comp.lang.ada:35884 Date: 2003-04-02T13:27:32+00:00 List-Id: In an application I need a variable discrete random function. Due to good reason I am reluctant to use my own very old http://www.csv.ica.uni-stuttgart.de/ftp/pub/ada/ica/misc/randomph.txt Instead, I would prefer to use generic type Result_Subtype is (<>); package Ada.Numerics.Discrete_Random is which offers a function Random (Gen : Generator) return Result_Subtype; but does not offer something like function Random (Gen : Generator; from : Result_Subtype := Result_Subtype'first; to : Result_Subtype := Result_Subtype'last) return Result_Subtype; which may or may not make sense in that raw disguise. Anyway in Ada95, I have to roll my own code or let me send one ;-) Does an AI exist for Ada95 or Ada2005? Did I miss something? -- --Peter Hermann(49)0711-685-3611 fax3758 ica2ph@csv.ica.uni-stuttgart.de --Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen --http://www.csv.ica.uni-stuttgart.de/homes/ph/ --Team Ada: "C'mon people let the world begin" (Paul McCartney)