In article 3C94EC4A.21401.25BB33@localhost, Prof Abimbola Olowofoyeku African_Chief@bigfoot.com writes
On 17 Mar 2002 at 13:16, Martin Liddle wrote:
I also note that trying to set the Capacity of a string schema is now flagged as an error.
My understanding that it should always have been flagged as an error.
Is there an "official" way to set the capacity? We were only setting the capacity as a workaround for problems in previous versions of gpc where under various circumstances it wasn't initialised properly. My first stab is to comment out all the places where we were setting capacity but I can't test if everything is OK because of the problem noted above.
'SetLength' should work. However, I am not sure that you can use it for increasing (as opposed to decreasing) the maximum length of a string.
I am not sure what your original problems were. I haven't experienced any problems with strings (as long as you actually initialise the variables (e.g., s := '') at some point, and don't expect the compiler to do it automatically).
I can assure that were in the past very serious problems with the capacity of strings not being initialised. There is still an outstanding bug on the bug list 'The capacity of strings declared in interfaces of modules is not initialised (daj3.pas)'. But we saw very other situations in which it occurred. I'll report back on whether there are any other remaining problems.