Xref: utzoo comp.lang.c:14367 comp.lang.misc:2196 comp.arch:7357 Path: utzoo!utgpu!watmath!clyde!att!rutgers!mailrus!nrl-cmf!ames!sgi!arisia!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.c,comp.lang.misc,comp.arch Subject: Re: Assembly or .... Message-ID: <764@quintus.UUCP> Date: 29 Nov 88 11:24:15 GMT References: <1388@aucs.UUCP> <729@convex.UUCP> <1961@crete.cs.glasgow.ac.uk> <8993@smoke.BRL.MIL> <1032@l.cc.purdue.edu> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 24 In article <1032@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >A trivial example is having a list of results to the left of >the replacement operator. I do not mean a vector or a struct; the items >may be of different types, and should not be stored in adjacent memory >locations. If you mean things like being able to write x, i, s := x/(1.0,+x), i-2, s || "x" || s CPL had it, BCPL has it (in sequential form), MESA has it (you have to put record constructor functions around both sides, but that's merely notational), and it has appeared in several experimental languages. Common Lisp supports it under the name PSETQ: (psetq x (/ x (+ 1.0 x)) i (- i 2) s (however-you-concatenate-strings s "x" s)) I have never understood why it was omitted from Pascal, Modula, ADA: x, y := y, x is the clearest way to exchange two variables I know. I once put this construct into the compiler for an Algol-like language; it was easy, and if the compiler had done any optimisation it would still have been easy. I don't see this as a question of getting at the machine level, but as providing one of the constructs in Dijkstra's notation (:-).