[fpc-pascal] typed constants...

David Mears david.mears at cox.net
Mon Oct 23 19:16:14 CEST 2006

is this bit of syntactic weirdness a fpc element, or from delphi.  I've 
largely been away from pascal since the early 90s, mostly only using it 
to write dos-y non-object-y utilities, for which it excels. 

typed constants  seem to basically to be like the static keyword from 
c.. but not a var modifier..  It just seems it should be a modifier for 
var.  such as var st:string static;..  since.. constant is usually 
pretty wrapped up in the meaning of "not changing."  and that it has a 
constant, initialized, reserved place in memory is.. well.. abstract.  
Especially since you can initialize your variables now, then the only 
thing that makes it special is that it is a global variable with  a 
local scope.

I'm not the sort who thinks pascal should be C, because I hate having to 
work with C or it's work likes.  I just think that being able to call 
something constant and change it muggles the syntactic clarity of the 
language, which is otherwise rather good.

More information about the fpc-pascal mailing list