🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++
Article #464

Pointers to member functions

#464
From: Marc Singer
Date: Wed, 07 Jun 1989 17:36
16 lines
1157 bytes
How does one call a member function using a pointer to that function.
I understand that some may feel it is a breech of good practice
since the language already has many features to eliminate the
need for pointers to functions; still the problem remains.

When I called a member functions using a pointer to that function,
the code which normally pushes the $this pointer did not exist.
Hence, the receiving prologue popped the first parameter as the
$this pointer.  Ahem.  It did not work.  I want to use a member function
because I want the function to be an implicit intimate to the private
parts of the class.  Simulating the $this pointer would be acceptable.

Marc Singer
        "When fullness is taken from fullness,
         fullness still remains."
                        Invocation of the Isha Upanishad
Technical Details
Message-ID: <29523@ucbvax.BERKELEY.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!fiji.Berkeley.EDU!elf

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!fiji.Berkeley.EDU!elf
From: elf@fiji.Berkeley.EDU (Marc Singer)
Newsgroups: gnu.g++
Subject: Pointers to member functions
Message-ID: <29523@ucbvax.BERKELEY.EDU>
Date: 7 Jun 89 17:36:26 GMT
Sender: usenet@ucbvax.BERKELEY.EDU
Lines: 16