Why pass structs? (not struct pointers)

markb at sdcrdcf.UUCP markb at sdcrdcf.UUCP
Thu Mar 5 03:31:05 AEST 1987


I always thought that it was added so that people who do complex math
would not have do any pointer hacking.  It is a lot nicer to be able to
write:

a = c_add(c_mul(b,c),d);

then

{  struct cmplx t;
   c_mul(&t,&b,&c);
   c_add(&a,&t,&d);
}

Mark Biggar
{allegra,burdvax,cbosgd,hplabs,ihnp4,akgua,sdcsvax}!sdcrdcf!markb



More information about the Comp.lang.c mailing list