If I Have
x: array[0..1] of integer;
x[0]:=10;
and then I do
SetArrayLength(x, 3);
will x[0] still be 10? or is it reset to 0?
If I Have
x: array[0..1] of integer;
x[0]:=10;
and then I do
SetArrayLength(x, 3);
will x[0] still be 10? or is it reset to 0?
http://www.macrosoftinc.com/ ---WTF COPIERS!!!
You cant set an array length when you already set it when you declared the variable so that wouldnt work, youd get a runtime error. but if you didnt declare it it would still be the same
Example:
SCAR Code:program New;
var
X: Array Of Integer;
begin
SetArrayLength(X,GetArrayLength(X) + 1);
X[0] := 10;
SetArrayLength(X,3);
WriteLn(IntToStr(X[0]));
end.
yeah thats what I ment
thanks, just needed to double check
http://www.macrosoftinc.com/ ---WTF COPIERS!!!
There are currently 1 users browsing this thread. (0 members and 1 guests)