Assembly or ....

Richard A. O'Keefe ok at quintus.uucp
Tue Nov 29 21:24:15 AEST 1988


In article <1032 at l.cc.purdue.edu> cik at 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 (:-).



More information about the Comp.lang.c mailing list