ricbrad
asked on
How can you declare mutually dependent object datatypes?
I want to have two object types that refer to each other in their definitions, but I can't get it to compile.
For example, how can I make the following work:
---
type Tfoo = class
procedure munge(bar : tBar);
end;
type Tbar = class
procedure munge(foo : tFoo);
end;
---
Many thanks,
Rich
For example, how can I make the following work:
---
type Tfoo = class
procedure munge(bar : tBar);
end;
type Tbar = class
procedure munge(foo : tFoo);
end;
---
Many thanks,
Rich
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sorry, my mistake... I made something wrong... :)
LOL@Ivanov_G
That's what we call a moment of total blindness... :-P Don't worry, none of us are perfect, not even me...
That's what we call a moment of total blindness... :-P Don't worry, none of us are perfect, not even me...
TBar = class;
TFoo = class
member : TBar;
end;
TBar = class
member : TFoo;
end;