Re: Delphi Variable as variable name

Posted by Maxwell on September 10, 2005

In Reply to: help posted by freshman on September 09, 2005

: Is there any way to use a variable as a variable name?

Script languages like Perl, PHP, SQL,... can have a "variable within a variable". Variable names (identifiers) can be "expanded" at execution time. Is this what you mean?

In Delphi's language Object Pascal, this is only possible with "objects":

 Object2 := Object1;

Seems as if you put the "name" Object1 into variable Object2. But in fact you have two pointers Object1 and Object2 that point to the same object.

This probably sounds confusing. Can you give an example of what you want to do, then I can try to give example code?