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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1c1a139977eee854 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-22 12:51:14 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsfeed.media.kyoto-u.ac.jp!news-xfer.siscom.net!not-for-mail Message-ID: <3CC469AC.C145FE47@yahoo.com> Date: Mon, 22 Apr 2002 14:51:08 -0500 From: Anatoly Chernyshev X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Case statement and Integers. References: <3CC44130.6472A3C8@yahoo.com> <_7Yw8.5103$av.2430419123@newssvr14.news.prodigy.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Original-NNTP-Posting-Host: 147.126.101.90 X-Original-Trace: 22 Apr 2002 13:52:13 -0700, 147.126.101.90 X-COMPLAINTS: Report abuse to abuse@mhogaming.com Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com NNTP-Posting-Host: b10f660b.news.newshosting.com X-Trace: DXC=^=AUe9KQT;X164Qi>j]_h^X`1N4>^k1LSiF6BbIV4YYRmfkIQ\;j:O\c;I1kBJajlWM;lF[5C2PfXo5dZhTdOGR]oh3?Aa9Y?3R X-Complaints-To: abuse@newshosting.com Xref: archiver1.google.com comp.lang.ada:22932 Date: 2002-04-22T14:51:08-05:00 List-Id: As usual with the open source, you can modify them at your own risk. This sample did not assume any usefulness in numbers comparison, it is just to illustrate use of the case selection. tmoran@acm.org wrote: > > pivot:constant integer:=30; > > begin > > for j in 1..100 loop > > numbers(j):=j; > > case Numbers(J) is > > when 1..Pivot - 1 => ... > > when Pivot + 1 .. 100 => ... > > when others => > > put_line (integer'image (j) & " is equal to " & integer'image(pivot)); > > end case; > > end loop; > It must be Monday morning. Insert the line > if j = 5 then numbers(j) = 500;end if; > and you will be surprised to find that " 5 is equal to 30"