[fpc-devel] Passing consts to const
david at e.co.za
Tue Jun 7 16:14:13 CEST 2005
The following code snippet gives a compile error: "Error: Can't assign
values to const variable".
It should be legal, since we are passing a const to a const parameter.
It should only give that error if TestBuf was declared as "var Buf"
instead of "const Buf".
procedure TestBuf(const Buf; Size: Integer);
const A : Byte = 1;
More information about the fpc-devel