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

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

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

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

Paul

--- GoldED 2.40
* Origin: Ten Minute Limit (3:711/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™.