delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/05/09/20:22:42

Date: Tue, 9 May 95 18:56:26 -0400
From: kim AT sli DOT com (Kimberley Burchett)
To: B DOT S DOT Runnacles AT soton DOT ac DOT uk
Cc: OKRA AT max DOT tiac DOT net, djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: is it me?
Reply-To: kim AT sli DOT com (or uunet!sli!kim)

> I've never really followed what goes on with C++ call by reference, I
> tend to stick to using the C way of thinking.

  It's certain that when I pass the array by reference, the compiler is
implementing it by passing a pointer, but how it is implemented should
not matter to me at the programming level.
  Besides, no matter how the compiler is mangling the interpretation of
passing by reference, it should ALWAYS be possible to pass a parameter
of a function back to the same function recursively - no matter HOW that
parameter is defined.
  The test case was:

class foo
{
public:
    void foo(something & x)
    {
       foo(x);
    }
}

  foo::foo is passing its own parameter to itself.  Even if foo was 
declared as "void(*)()(*foo)(void(*)())" it should still be able to pass 
it to itself recursively.
							Kim

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019