Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Misc > pass property t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 6042 of 6113
Post > Topic >>

pass property to to function parameter

by column <column.column@[EMAIL PROTECTED] > Apr 28, 2008 at 06:37 AM

Hello,

Is it possible to pass property to function parameter? Unfortunately I
got error 'Types of actual and formal var parameters must be
identical'.


type TStringProperty = procedure (const s:string) of object;

type
TMyClass = class
  private
    FID: integer;
    procedure SetID(const Value: integer);
  published
    property ID: integer read FID write SetID;
end;


function C( var into_: TStringProperty):boolean;
begin
into_('a');
result:= true;
END;


procedure TEFT_Vserver.SetID(const Value: integer);
begin
  FID := Value;
end;


Than You
 




 6 Posts in Topic:
pass property to to function parameter
column <column.column@  2008-04-28 06:37:03 
Re: pass property to to function parameter
Marco van de Voort <ma  2008-04-28 13:53:03 
Re: pass property to to function parameter
column <column.column@  2008-04-28 07:11:58 
Re: pass property to to function parameter
Rob Kennedy <me3@[EMAI  2008-04-28 20:23:43 
Re: pass property to to function parameter
Marco van de Voort <ma  2008-04-28 14:52:40 
Re: pass property to to function parameter
"Rudy Velthuis"  2008-04-28 18:10:02 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 23 16:17:21 CDT 2008.