[fpc-pascal] Constants

Carsten Bager carsten at beas.dk
Wed Jan 18 13:09:59 CET 2006


> 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.

Why not just drop static constants in the Text (Code) segment. I have 
seen other compilers do that. This will not involve any change of the 
interface with the linker (That is what I am doing now in a separate 
assembler file).
On the other hand I am already using a configuration file for the 
linker. (Where to place Stack, data code etc.)  I assume that it would 
be easy to take care of an extra segment in the linker configuration 
file.

Regards Carsten





More information about the fpc-pascal mailing list