Am 22.11.2011 10:13, schrieb michael.vancann...@wisa.be:
If we choose to implement such a function, yes. My response was based on
the compiler as it is.
Seems like I'm not the only one that likes to have such a function.
Though I would extend it to convert identifiers in scope to strings
(such as functions names etc.)
But what is the use ? As far as I can see, it forces you to type more.
Typing
VarName:=nameofvar( counter );
is more work than
VarName:='counter';
So what's the point ?
The best argument for such a feature is that the name is checked by the
compiler. If I change the declaration of the variable the compiler will
complain in the first case, but not in the second (let's assume that we
don't need to care about some kind of backwards compatibilty, just
because we wrote the identifiers to a file in different versions of the
application were the variable had different names).
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal