[Lazarus] Got "Pointer", expected "Open Array Of Char"
Dave Coventry
dgcoventry at gmail.com
Sun Jan 13 14:58:49 CET 2013
On 13 January 2013 14:56, leledumbo <leledumbo_cool at yahoo.co.id> wrote:
> Or const since it's meant to be read only
Hmmm.
Doesn't help. Still getting the same error.
I've tried passing the src parameter as a Pointer and then casting it
as an array of Char.
procedure Copybytes(var dst: Pointer; src: Pointer; len: integer);
var
i: integer;
data_in,data_out: Array of Char;
begin
data_in:=@src;
data_out:=@dst;
for i:=0 to len-1 do
begin
data_out[i]:=data_in[i];
end;
end;
Calling the procedure: Copybytes(@dst[dloc], at src[sloc],16);
I get the error
Error: Can't assign values to an address
More information about the Lazarus
mailing list