[fpc-pascal] readonly variables

Anthony Walter sysrpl at gmail.com
Sun Nov 29 22:59:55 CET 2009

> Do you mean this one?
> "Using const allows the compiler to optimize code for structured- and
> string-type parameters."
> "Allows" is not the same as "forces". This line in the help file does not
> say that const parameters are passed by reference. It says that it may often
> be so, perhaps all current implementations make it so, but it is by no means
> guaranteed.

Martin Schreiber also chimed in, pointing out:


"Larger sets, records, and static arrays are passed as 32-bit pointers
to the value."

The documentation is unambiguous there. Claiming that it doesn't have
anything to say on the subject is patently false.

More information about the fpc-pascal mailing list