Uffe, > I need to pass af buttons caption string to a procedure as var parameter. > > procedure keyboard(var KeybString: string); > . > . > . > > fmKeyboard.keyboard(btCompound.Caption); > > But i get the following error: > Types of actual and formal var parameters must be identical > > > How do I make this to work?
The problem is that Caption is not a string, it is a property that has the string type. So you cannot use it as a var parameter. There are several things you can do. For example, copy the caption to a string variable, pass it to the routine, then copy the string back to the caption. You may save a step if the parameter is a value parameter: pass the caption as a value parameter, then copy the new value back to the caption. Rory Daulton [EMAIL PROTECTED] ------------------------------------------------------------------------------- [This e-mail scanned for viruses and spam by Nmax - "Your MAXimum Connection!"] ------------------------ Yahoo! Groups Sponsor --------------------~--> Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life. http://us.click.yahoo.com/A77XvD/vlQLAA/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/

