Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Marco van de Voort
In our previous episode, Darius Blaszyk said: > What > preprocessor do you use then, M4? Nearly always custom. With "general" I mean anything not part or integrated with the compiler, not necessarily a known product. The usage is now deceased and replaced by generics for the most. > I'm curious

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > I meant that in the context of FPC, which works out dependencies etc. on > the fly, one can't arbitrarily hook in an external preprocessor. I meant > that it wasn't another stage in a makefile because FPC doesn't (can't) > use makefiles- for rea

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Unfortunately pascal macro's are rather limited compared to C. I know I know, you could potentially open up a can of worms, but sometimes more control is required. There is nothing restraining anybody using an external

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Michael Van Canneyt
On Wed, 6 Mar 2013, Marco van de Voort wrote: In our previous episode, Mark Morgan Lloyd said: Unfortunately pascal macro's are rather limited compared to C. I know I know, you could potentially open up a can of worms, but sometimes more control is required. There is nothing restraining a

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Darius Blaszyk
Just found this project. Seems to be abandoned but might be interesting in the light of Marco's reply; http://code.google.com/p/metapascal/ [1] Links: -- [1] http://code.google.com/p/metapascal/ ___ fpc-pascal maillist - fpc-pascal@lists.freep

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Darius Blaszyk
mar...@stack.nl schreef op 6 mrt '13: > In our previous episode, Mark Morgan Lloyd said: > Unfortunately pascal macro's are rather limited compared to C. I know I know, you could potentially open up a can of worms, but sometimes more control is required. >>> There is nothing restraining

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Marco van de Voort
In our previous episode, Mark Morgan Lloyd said: > >> Unfortunately pascal macro's are rather limited compared to C. I know I > >> know, you could potentially open up a can of worms, but sometimes more > >> control is required. > > > > There is nothing restraining anybody using an external macro

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Marco van de Voort
In our previous episode, John Lee said: > So, why can't we have a get_name() type routine, so everyone can use it, > not just those who can write pascal macros? J The proposed Get_name only makes sense for logging purposes. Since if you can't resolve the gotten string back to an address, it is pre

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread John Lee
So, why can't we have a get_name() type routine, so everyone can use it, not just those who can write pascal macros? J > Unfortunately pascal macro's are rather limited compared to C. I know I > know, you could potentially open up a can of worms, but sometimes more > control is required. > > There

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Mark Morgan Lloyd
Marco van de Voort wrote: In our previous episode, Darius Blaszyk said: Here's why :) Unfortunately pascal macro's are rather limited compared to C. I know I know, you could potentially open up a can of worms, but sometimes more control is required. There is nothing restraining anybody usin

Re: [fpc-pascal] Get variable name at runtime

2013-03-06 Thread Marco van de Voort
In our previous episode, Darius Blaszyk said: > Here's why :) > > Unfortunately pascal macro's are rather limited compared to C. I know I know, > you could potentially open up a can of worms, but sometimes more control is > required. There is nothing restraining anybody using an external macro

Re: [fpc-pascal] Get variable name at runtime

2013-03-05 Thread John Lee
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

Re: [fpc-pascal] Get variable name at runtime

2013-03-05 Thread Darius Blaszyk
Here's why :) Unfortunately pascal macro's are rather limited compared to C. I know I know, you could potentially open up a can of worms, but sometimes more control is required. Darius On Mar 5, 2013, at 5:07 PM, Sven Barth wrote: > Am 05.03.2013 16:41, schrieb Darius Blaszyk: >> Is there an

Re: [fpc-pascal] Get variable name at runtime

2013-03-05 Thread Sven Barth
Am 05.03.2013 16:41, schrieb Darius Blaszyk: 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

Re: [fpc-pascal] Get variable name at runtime

2013-03-05 Thread Darius Blaszyk
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. Darius On Mar 4, 2013, at 10:05 PM, Sven Barth wrote: > Am 04.03.2013 14:39, schrieb dhkblas...@zeelandnet.nl: >> Hi, >> >> How can I retrieve a variable nam

Re: [fpc-pascal] Get variable name at runtime

2013-03-04 Thread Sven Barth
Am 04.03.2013 14:39, schrieb dhkblas...@zeelandnet.nl: Hi, How can I retrieve a variable name at runtime? I know about RTTI on classes, what about simple type variables? It's not possible. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.

[fpc-pascal] Get variable name at runtime

2013-03-04 Thread dhkblaszyk
Hi, How can I retrieve a variable name at runtime? I know about RTTI on classes, what about simple type variables? Regards, Darius ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal