[fpc-pascal] Constants

Marco van de Voort marcov at stack.nl
Wed Jan 18 12:36:32 CET 2006

> Would there be a chance to implement "Static" or something that did 
> the same trick, in the compiler. Now I write my constants in an 
> assembler file. That?s acceptable, but it is not a very elegant way to 
> do it.

It's not the keyword that is the problem. The whole logic for this would
have to be implemented.  Think switches, commands to the linker, a way to
configure the name for the segment etc. Part of this is specific for your
device setup.

If writable const is off, also variables declared with CONST could be put in
a different segment. There is no need to invent new syntax.

However all the linker stuff should be implemented by sb who has such a
device and the interest to work on it.

More information about the fpc-pascal mailing list