The D Programming Language
Dave Burton
daveb at laidbak.UUCP
Sun Mar 6 13:07:01 AEST 1988
In article <25284 at cca.CCA.COM> g-rh at CCA.CCA.COM.UUCP (Richard Harter) writes:
>Here is another feature for D whose absence in C has been irksome to
>me -- I would like to be able to return several items from a function.
>... But how do I get stuff back.
>... Things which are returned need a mechanism equivalent to pass
>by address.
Please don't design D until you understand C.
C has had pass by reference for a very long time (since its inception?).
The following useless code illustrates:
int flag, foobar();
x = foobar(&flag);
...
int foobar(arg)
int *arg;
{
*arg = 1;
return 0;
}
Now, what could be simpler?
--
--------------------"Well, it looked good when I wrote it"---------------------
Verbal: Dave Burton Net: ...!ihnp4!laidbak!daveb
V-MAIL: (312) 505-9100 x325 USSnail: 1901 N. Naper Blvd.
#include <disclaimer.h> Naperville, IL 60540
More information about the Comp.lang.c
mailing list