Re: Passing by reference

From: Leonardo Herrera (leonardo.herrera@mercantil.com)
Date: 03/14/01


Peter Ajamian wrote:
> Leonardo Herrera wrote:
[...]
> > void g(int &i);
> > g(x);
>
> This is only good in C++, not C.

Yup, it never meant to be C ;-)

> You can, however, wrap the function in a macro to accomplish the
> same thing.  See my previous post in this thread for an example
> of how to do this.  You would want to do that if, for example, you
> were replacing an existing function.

I'm just trying to figure out the right "wording" (sp? gr? syn?) of this
operation. My point of confusion is "passing references" vs "taking
references". Is just about semantics, and terminology. A very useless
topic -at least if you aren't interested on compilers, etc-. Also,
because english is not my primary language, sometimes I have troubles
with nomenclature and/or definitions.

Regards,
--
Leonardo Herrera
mailto:leonardo.herrera@mercantil.com

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/04/01 PST