Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!mit-eddie!uw-beaver!tektronix!zeus!tekla!dant From: dant@tekla.UUCP Newsgroups: comp.lang.c Subject: swaps with arrays Message-ID: <2376@zeus.TEK.COM> Date: Tue, 8-Sep-87 02:05:31 EDT Article-I.D.: zeus.2376 Posted: Tue Sep 8 02:05:31 1987 Date-Received: Wed, 9-Sep-87 01:33:22 EDT Sender: news@zeus.TEK.COM Reply-To: dant@tekla.UUCP (Dan Tilque) Organization: First National Security Trust Bar and Grill Lines: 18 In article <109@umigw.MIAMI.EDU> steve@umigw.UUCP (steve emmerson) writes: > >[swap macro] also won't work with pure array objects (i.e. swapping one >array with another). A generic routine should be able to work with >*anything*. Can someone tell me why every one expects (or requires) a swap macro to work with arrays? The reason that they don't is that an array name is a constant and not an object. For the same reason comparisons of arrays don't work, you just compare the addresses of the arrays. So I don't see why everyone wants the *perfect* swap macro to work for arrays. A more or less unrelated question: When they made structure assignments legal, did they also make structure comparisons legal? --- Dan Tilque dant@tekla.tek.com or dant@tekla.UUCP