is it possible to set a variable in a programm as a readonly variable?

Not that I am aware of. But for what reason do you want such a behaviour?
And if I think it over, this can only work at runtime (letting the program 
crash on the second assignment). At compile time the compiler may not exactly 
know which assignment is done in what order. If you set the variable in a 
procedure or function the compiler would have to check when this procedure is 
called (which can be called by another procedure and so on). The first call 
(and assignment) would be ok but the second should generate an error? How 
should the compiler know how often the routine is called? This can even be 
dependend on input data.


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to