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,LOTS_OF_MONEY 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-20 11:47:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.tampabay.rr.com!news-post.tampabay.rr.com!typhoon.southeast.rr.com.POSTED!not-for-mail From: "Rhoady" Newsgroups: comp.lang.ada References: Subject: Re: Case statement and Integers. X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Sat, 20 Apr 2002 17:04:09 GMT NNTP-Posting-Host: 66.61.51.35 X-Complaints-To: abuse@rr.com X-Trace: typhoon.southeast.rr.com 1019322249 66.61.51.35 (Sat, 20 Apr 2002 13:04:09 EDT) NNTP-Posting-Date: Sat, 20 Apr 2002 13:04:09 EDT Organization: RoadRunner - Cox Xref: archiver1.google.com comp.lang.ada:22828 Date: 2002-04-20T17:04:09+00:00 List-Id: How about a nested IF like so: if Numbers(j) < Pivot then Swap (Left_Swap, Right_swap); elsif Numbers(j) < Pivot then Swap (Right_Swap, Left_Swap); else Null; end if; This appears to be the 'guts' of a sort so I assume that this is inside a for loop steping through the values of J. And that J is being used to index the array Numbers. What I do not have a clue about is Pivot, Right_Swap and Left_Swap. Where are they set and to what values. Jeff "Wannabe h4x0r" wrote in message news:YTgw8.79490$G72.56764@sccrnsc01... > I have a statement like this... > > case numbers(j) is > when numbers(j) < pivot => swap(left_swap, right_swap); > -- If the number is less than the pivot, swap it with the number > -- to the right of the Pivot; > when numbers(j) > pivot => swap(right_swap, left_swap); > -- If the number is greater than the pivot, then do the opposite of the > -- above. > when numbers(j) = pivot => null; > when others => null; > end case; > > Now, it's pretty obvious whats wrong here. The swap procedure is > expecting an Integer, and instead it's getting a boolean value due to the > '>', '<', and '=>' operators. > > Whats the proper way to indicate to the compiler that I want to send > the numbers indexed by "left_swap" and "right_swap" to the swap procedure > rather than the results of the boolean test in the case statement? > > Thanks for your patience. > > Chris