At 9:54 -0400 4/4/06, Pascal Viandier wrote:
Your suggestion (Frank) to check the value of the Capacity is excellent. I will add the check (>= 0) in the patch.
Someone correct me if I'm wrong, but I believe the capacity for a string must be strictly greater than 0 to be valid.
s: String(0) is not valid, which is why you have to write code like:
procedure Doit( const t: String ); var s: String( Max(1,t.Length) ); begin ...
to make a string capable of holding string t with a runtime unknown length and capacity.
Enjoy, Peter.