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,583275b6950bf4e6 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,59ec73856b699922 X-Google-Attributes: gid1108a1,public X-Google-Thread: fdb77,5f529c91be2ac930 X-Google-Attributes: gidfdb77,public X-Google-ArrivalTime: 2003-05-11 18:04:28 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!arclight.uoregon.edu!wn13feed!wn12feed!wn14feed!worldnet.att.net!204.127.198.203!attbi_feed3!attbi_feed4!attbi.com!sccrnsc02.POSTED!not-for-mail Message-ID: <3EBEF319.1050107@attbi.com> From: "Robert I. Eachus" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.java.advocacy,comp.object,comp.lang.ada Subject: Re: Using Ada for device drivers? (Was: the Ada mandate, and why it collapsed and died) References: <9fa75d42.0304230424.10612b1a@posting.google.com> <9fa75d42.0304240446.493ca906@posting.google.com> <3EA7E0E3.8020407@crs4.it> <9fa75d42.0304240950.45114a39@posting.google.com> <4a885870.0304291909.300765f@posting.google.com> <416273D61ACF7FEF.82C1D1AC17296926.FF0BFD4934A03813@lp.airnews.net> <9fa75d42.0305010621.55e99deb@posting.google.com> <0-WcnWfafqsNpiyjXTWcqw@gbronline.com> <1051804573.732603@master.nyc.kbcfp.com> <3EBE9BD4.1050008@attbi.com> <3EBEC762.3030705@attbi.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.62.164.137 X-Complaints-To: abuse@attbi.com X-Trace: sccrnsc02 1052701467 24.62.164.137 (Mon, 12 May 2003 01:04:27 GMT) NNTP-Posting-Date: Mon, 12 May 2003 01:04:27 GMT Organization: AT&T Broadband Date: Mon, 12 May 2003 01:04:27 GMT Xref: archiver1.google.com comp.lang.java.advocacy:63542 comp.object:63222 comp.lang.ada:37215 Date: 2003-05-12T01:04:27+00:00 List-Id: Hyman Rosen wrote: > Okay, thanks. Since not all Ada programmers are the author of random > number generators for Ada compilers, you should agree that this is an > issue that can be overlooked, and could produce incorrect results that > would not be caught by Ada language facilities. It was just that I had stated that the only reason for writing this program was to use it to explain the rationale for generating permutations this way. > And by the way... > > type Suits is (...); > > type Ranks is (...); > > Deck: Card_Array(0..51); > > What's up with that 51? Shouldn't that be a calculation based on the > Suits'Last'Pos and Ranks'Last'Pos? Good, question, I think the answer is a judgement call. I could have written: Deck: Card_Array(0..(Suits'Last'Pos+1)*(Ranks'Last'Pos+1)-1); But I think the way I chose was more obviously correct, and easier to maintain, even if someone wanted to change the code to play Pinochle.