Quote Originally Posted by JSoftware
* Dynamic arrays have pointer semantics, but value syntax
* Constant arrays have set syntax
Could you elaborate on those two?
[pascal]
var a,b:array of byte;

begin
setlength(a,1);
a[0]:=1;
b:=a;
b[0]:=2;
writeln(a[0]);
end;
[/pascal]

A and b are basically pointers to arrays, but because they don't use a pointer syntax, the above result is unexpected for many.

[pascal]
procedure a(const b:array of byte);

begin
end;

begin
a([1,2,3,4]); {Set constant or array constant?}
end;
[/pascal]

Now in this example things are pretty clear, but if procedure a is in a different unit, it is not clear what that constant means.