YAAO (yet another assignment op
Mark Wittenberg
mark at rtech.ARPA
Tue Feb 12 10:36:07 AEST 1985
> I always thought it would be sort of nice to have
> <=>
> as "swap": thus
> a <=> b;
> replaces
> some_type c;
> c = a;
> a = b;
> b = a;
> useful since "some_type" can't be decided dynamically.
> Also on some machines and for some "some_type" this
> can be done efficiently, even atomically, eg,
> register char *a, *b;
>
> a <=> b;
> on a 68000 is one instruction.
>
> Mark Wittenberg
> Relational Technology, Inc.
> ucbvax!mtxinu!rtech!mark
> zehntel!rtech!mark
Well, thanks to the miracle of modern network delay, I see that someone
else has already suggested this operator, although I didn't see the proposed
syntax. You can't win them all.
/mark
More information about the Comp.lang.c
mailing list