Re: [fpc-devel] Minor doc error about "const param"

2021-12-24 Thread Martin Frb via fpc-devel
On 24/12/2021 18:07, Bart via fpc-devel wrote: On Fri, Dec 24, 2021 at 12:00 PM Adriaan van Os via fpc-devel wrote: Neither would the compiler allow (I hope) the const parameter to be passed as a var parameter. It does not: {$mode objfpc} {$h+} procedure foo(var x: integer); begin end;

Re: [fpc-devel] Minor doc error about "const param"

2021-12-24 Thread Bart via fpc-devel
On Fri, Dec 24, 2021 at 12:00 PM Adriaan van Os via fpc-devel wrote: > Neither would the compiler allow (I hope) the const parameter to be passed as > a var parameter. It does not: {$mode objfpc} {$h+} procedure foo(var x: integer); begin end; procedure bar(const y: integer); begin

Re: [fpc-devel] Minor doc error about "const param"

2021-12-24 Thread Adriaan van Os via fpc-devel
Michael Van Canneyt via fpc-devel wrote: I will probably have to rephrase the documentation to 'The compiler will not allow you to modify the parameter value by assigning something directly to it." Neither would the compiler allow (I hope) the const parameter to be passed as a var parameter.