TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Paul Edwards
from: Frank Malcolm
date: 1993-06-30 06:09:18
subject: greatest common divisor

Hi, Paul.

PE> PE>> {
PE> PE>> temp = a;
PE> PE>> a = b;
PE> PE>> b = temp;
PE> PE>> }

PE> FM> Couldn't you avoid using the temporary variable by replacing the above
PE> FM> with
PE> FM>      {
PE> FM>        a ^= b;
PE> FM>        b ^= a;
PE> FM>        a ^= b;
PE> FM>      }

PE>Sure can.  Might get a few remarks about "code readability"
though!  :-)

Well guess what, I did! Regards, FIM.

 * SLMR 2.1a * del Banquo.*  del damnspot.*

--- Maximus 2.01wb

* Origin: Sydney PC Users Group - COMPAQ BBS (3:712/505)
SEEN-BY: 54/54 99 711/401 430 807 808 809 932 934 712/218 407 414 505 506 515
SEEN-BY: 712/517 537 618 623 627 704 719 713/306 888 714/906
@PATH: 712/505 623 54/99 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.