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.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,b50bc6538a649497 X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: if statements Date: 2000/11/07 Message-ID: <8u9r96$jmb$1@wanadoo.fr>#1/1 X-Deja-AN: 690944489 References: <3A02CED4.520C2768@brighton.ac.uk> <3A078B6F.D34B024B@erols.com> <8u8j99$2rk$1@nnrp1.deja.com> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Complaints-To: abuse@wanadoo.fr X-Trace: wanadoo.fr 973631590 20171 193.250.72.155 (7 Nov 2000 21:13:10 GMT) Organization: Wanadoo, l'internet avec France Telecom X-MSMail-Priority: Normal NNTP-Posting-Date: 7 Nov 2000 21:13:10 GMT Newsgroups: comp.lang.ada Date: 2000-11-07T21:13:10+00:00 List-Id: a �crit dans le message news: 8u8j99$2rk$1@nnrp1.deja.com... > A funny version that does not require a temp variable: > > procedure Swap (A, B : in out Integer) is > begin > if A <= B then > A := A + B; > B := A - B; > A := A - B; > end if; > end Swap; > > It works better if A, B are modular (:-)) > But then, you have : A:= A xor B; B := B xor A; A := A xor B;