Yet Another Assignment Operator (YAAO)

David Herron, NPR Lover david at ukma.UUCP
Tue Jan 1 04:14:59 AEST 1985


>	let x = a[j*10+i] in x = func(x);

Or (in C):

	f(i,j)
	int i,j;
	{
		<type> *x;
		<type> a[NELEMS];
		extern <type> *func(<type> *x);

		x = &a[j*10+i];
		x = func(x);
	}

This avoids ANY confusion as to order of (or how often) the expression
is evaluated.  Has the advantage of being already compatible.  
(your suggested form would have to be DONE somehow.....and isn't
all that clear anywho).

--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:--:-
David Herron;  ARPA-> "ukma!david"@ANL-MCS
(Try the arpa address w/ and w/o the quotes, I have had much trouble with both.)

UUCP          -:--:--:--:--:--:--:--:--:-          (follow one of these routes)

{ucbvax,unmvax,boulder,research} ! {anlams,anl-mcs} -----\  vvvvvvvvvvv
							  >-!ukma!david
   {cbosgd!hasmed,mcvax!qtlon,vax135,mddc} ! qusavx -----/  ^^^^^^^^^^^



More information about the Comp.lang.c mailing list