[fpc-pascal] Get variable name at runtime

Darius Blaszyk dhkblaszyk at zeelandnet.nl
Wed Mar 6 14:49:00 CET 2013


 

marcov at 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 anybody using an external macro processor. It is
just that we don't want to support it :-)
>> Actually, I'd suggest that
there is: the difficulty of integrating an external macro processor with
the standard build process (i.e. it's not just another stage in a
makefile).
> 
> It is. Export all known sources to a new dir for the
compiler through the
> preprocessor.
> 
>> I've had to deal with
colleagues in the past who thought it was entirely acceptable to make
manual edits to compiler output (typically on Intel blue boxes) before
running it through the assembler, and it's very high on my list of Thou
Shalt Nots.
> 
> General preprocessor usage is on mine. I use
preprocessors and
> codegenerators all the time, and have no problem
whatsoever with it.
> 
> What I have a problem is, is to give that
formal statement, so that future
> development on the compiler will be
limited by it in all its gory glory.
> 
> IMHO we should simply have a
directive that is either cdecl or stdcall
> depending on the platform,
and kill even the current macro support. 
>
_______________________________________________
> fpc-pascal maillist -
fpc-pascal at lists.freepascal.org
>
http://lists.freepascal.org/mailman/listinfo/fpc-pascal [1]

What
preprocessor do you use then, M4? I'm curious to find out how you use an
external preprocessor. In principle it's not a bad idea to use an
external one. I suggest we could also make it a bit more user friendly
by providing some hooks in fpmake. This way one should not nescesarily
create additional scripts to copy files to other locations. What do you
think?

Please demonstrate how you use macro's in your perticular case.
How do you adjust your build system. 

 

Links:
------
[1]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20130306/ba650bcd/attachment.html>


More information about the fpc-pascal mailing list