In our previous episode, Jan Kowalski said:
> Hi, I try to convert string to structure field. As example:
>
> function getRepF(argo,argn: string): boolean;
> begin
> ...
> dataA.'argn':=argo;
> ...
> end;
>
> argn is a string with name of structure (dataA) field. Is there any
> way to do that ? somethink like FindStructField ?
In general: no. In compiled languages, identifier names are generally
eliminated in the compilation process.
There are remote cases possible for classes (RTTI/introspection), but these
are special cases. See the examples for e.g. unit typinfo.
_______________________________________________
fpc-pascal maillist -
fpc-pascal@...
http://lists.freepascal.org/mailman/listinfo/fpc-pascal