[fpc-pascal] Const params question

Michael Van Canneyt michael at freepascal.org
Wed Oct 11 13:03:39 CEST 2017



On Wed, 11 Oct 2017, Graeme Geldenhuys wrote:

> On 2017-10-11 11:36, Michael Van Canneyt wrote:
>> In the case of const, you don't know. The compiler will do as it sees fit.
>
> Oh wow, I really didn't know that.
>
>> ....snip....
>> The difference is that you can assign something to a var parameter,
>> but you cannot assign something to a constref.
>
>
> Thank you Michael, that was very informative information. One is never 
> too old to learn. ;-)

It is actually documented:

https://www.freepascal.org/docs-html/current/ref/refsu67.html#x179-20100014.4.4

Michael.



More information about the fpc-pascal mailing list