[fpc-pascal] Get variable name at runtime

John Lee johnelee0 at gmail.com
Tue Mar 5 23:24:00 CET 2013


Think there were reasons why it'd be useful - I'd like it so one can
(easily) make a disk backup of specific variables' values eg on disk for
programs (I have one) that need to be able to continue after stopping or a
power failure.

I know new facilities are never trivial, need maintenance etc, but I'm
guessing it wouldn't be too difficult (eg for you!) to implement. This
would be especially true if it was limited to 'simple' variables longint,
string, float etc

John


> >> Is there any way macro's could help in this respect? I'm looking for an
> way to write the variable name and value to screen at runtime.
> > No. I had once asked some time ago for a compiler intrinsic which
> returns the name of an identifier, but I was told "why would you need
> this?!"...
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130305/147bb9c6/attachment.html>


More information about the fpc-pascal mailing list