Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Writing over array bounds

phhvw2phhvw2 Member Posts: 2
Hi,

I'm fairly new to Delphi Pascal although quite experienced with C/C++.

My question is: does below function write data into some other memory locations outside 'myArr[]'??? (C/C++ does)

------------------------------------------

procedure TForm1.MyFunction();
var
i : integer;
myArr : array of byte;
begin

SetLength(myArr,[b]10[/b]);

for i := 0 to [b]10000[/b] do begin
myArr[i]:=11;
end;

end;

------------------------------------------

Thanks,

Henk


Sign In or Register to comment.