TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Jasen Betts
from: Auke Reitsma
date: 1998-08-31 20:28:00
subject: Struct and `this`

Hi Jasen,

On 29 Aug 98, 16:24, you wrote to FRANK ADAM

 FA>> Something i've been playing with, without result. Is there a
 FA>> way of passing a variable or something like a "this" from a
 FA>> struct to one of it's own functions ? struct thiswontwork

 JB> I think you'd have to do it explicitly each time you call the
 JB> function. kind-of cumbersome, but still functionally object
 JB> oriented.

 JB> *eg.func(eg) /* or whatever the syntax is... */

That would be: (*eg).func(eg); /* ... ;-) */
Or rather:       eg->func(eg); /* showing the shorthand for "(*eg)."
And even better: (eg->func)(eg); /* to show that it is a function pointer */

Greetings from
 _____
 /_|__|  Auke Reitsma, Delft, The Netherlands.
/  | \  --------------------------------------

--- GEcho 1.00
* Origin: Home by the C (Auke.Reitsma{at}net.hcc.nl) (2:281/400.20)
SEEN-BY: 396/1 622/419 632/0 371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/213 218
@PATH: 281/400 1 280/801 270/101 396/1 633/260 635/506 728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.