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=0.6 required=5.0 tests=BAYES_00,FROM_WORDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b50bc6538a649497 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-11-08 19:54:04 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!hermes.visi.com!news-out.visi.com!nntp.flash.net!news.flash.net!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada References: <3A02CED4.520C2768@brighton.ac.uk> <3A078B6F.D34B024B@erols.com> <8ua3m1$bru$1@nnrp1.deja.com> <3A09A39F.2822C01B@cepsz.unizar.es> Subject: Re: if statements X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Thu, 09 Nov 2000 03:54:03 GMT NNTP-Posting-Host: 216.215.86.151 X-Complaints-To: abuse@flash.net X-Trace: news.flash.net 973742043 216.215.86.151 (Wed, 08 Nov 2000 21:54:03 CST) NNTP-Posting-Date: Wed, 08 Nov 2000 21:54:03 CST Organization: FlashNet Communications, http://www.flash.net Xref: supernews.google.com comp.lang.ada:1918 Date: 2000-11-09T03:54:03+00:00 List-Id: "Alejandro Villanueva" <190921@cepsz.unizar.es> wrote in message news:3A09A39F.2822C01B@cepsz.unizar.es... : Robert Dewar wrote: : : > In article <3A078B6F.D34B024B@erols.com>, : > Daniel Allex wrote: : > > procedure Swap ( A, B : in out Integer ) is : > > Temp : Integer := 0; : > > begin : > > if A <= B then : > > Temp := A; : > > A := B; : > > B := Temp; : > > end if; : > > end; : > : > Finally he gets someone to do his homework for him, though : > not very competently (this looks like another student : > tackling the excercise for the first time :-) : : Robert, you do always the same... why do you have to say that? : It IS a valid solution, and not the solution a geek will give after all. : And MOST important: it WORKS! Well, actually, it *doesn't* work for the stated problem: : > "Exercise 4.1: Write an if statement which will swap the values of : > variables A and B if necessary so that the smaller value ends up in : > A and the larger value ends up in B." It also does one or more unnecessary things (this will be left as an exercise for the student :)