On Mon, Dec 20, 2021 at 12:07 PM Martin Frb via fpc-devel
<fpc-devel@lists.freepascal.org> wrote:

> https://www.freepascal.org/docs-html/current/ref/refsu67.html#x183-20700014.4.4
>  > Specifying a parameter as Constant is giving the compiler a hint that
> the contents of the parameter will not be changed by the called routine.

Actually it is a contract between the programmer and the compiler,
telling the compiler that the value of sais constant parameter will
not be altered in any way.
The compiler will enforce this as much as it can, but it is up to the
programmer to not have other processes alter the value of that
parameter, whilst that function is still running.

Any side effects of circumventing the compilers efforst to enforce
this are at your own risks.

-- 
Bart
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to