David Butler wrote:
{$WRITEABLECONST OFF}
procedure TestBuf(const Buf; Size: Integer);
begin
end;
const A : Byte = 1;
From this point A is treated as a normal variable with an initial
assignment...
begin
TestBuf(A, 1);
... so it is not const here.
Guess if you would substitute the line
> const A : Byte = 1;
with
> const A = 1;
It should work. AFAIR, typed constants are treated exactly as variables
with an initial value.
--
At your service,
Kornel Kisielewicz (charonATmagma-net.pl) [http://chaos.magma-net.pl]
Carceri -- A prelude to GenRogue... Coming Soon
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel