Board index » delphi » Passing Procedures

Passing Procedures

When you pass a procedure around in delphi, are you passing a copy of
the procedure, or a pointer to the procedure (like pascal does with
arrays).  I need to do this a number of times, and want to make sure
that I'm not wasting resources.

Please respond to my email address, as well as this group.

Steve Dobbs
sdo...@noproblem.com

 

Re:Passing Procedures


On Fri, 05 Sep 1997 13:25:54 -0500, Steve Dobbs

Quote
<sdo...@spam.noproblem.com> wrote:
>When you pass a procedure around in delphi, are you passing a copy of
>the procedure, or a pointer to the procedure (like pascal does with
>arrays).  I need to do this a number of times, and want to make sure
>that I'm not wasting resources.

Procedure variables handle procedures by reference rather than by
value.  Physically, the variables are assigned an address value.  So,
the storage requirements are just like a pointer.

Syntactically, of course, you cannot dereference a procedure variable
as if it were a pointer.  So, I'm reluctant simply to state that they
are pointers and have someone not understand what the distinction is.

Other Threads