if you really dont need to pass the parameter as variable, declare it as constant TfmKeyboard.keyboard(const aCaption: TCaption);
Vahan -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Behalf Of safeldt2 Sent: Friday, September 09, 2005 12:31 PM To: [email protected] Subject: [delphi-en] Re: Passing a caption as var string. --- In [email protected], Vahan Yoghoudjian <[EMAIL PROTECTED]> wrote: > Button.Caption is of Type TCaption, either declare your parameter is TCaption... I tried that but then I get this error: "Constant object cannot be passed as var parameter" Why is it a constant when I can give it a new value at runtime? btCompound.Caption := 'a text'; The main problem is that i need to call the procedure many times in my project and found it more ellegant not to use temporary variables. Uffe ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] ---------------------------------------------------------------------------- ---- YAHOO! GROUPS LINKS a.. Visit your group "delphi-en" on the web. b.. To unsubscribe from this group, send an email to: [EMAIL PROTECTED] c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ---------------------------------------------------------------------------- ---- [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/i7folB/TM --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

