CBFalconer wrote:
I look on the string facility as similar to the file facility in some respects. For files, some sort of automatic initialization is needed so that reset/rewrite can function, and so that the error of reading/writing to unopened files can be detected. For strings the 'capacity' has to be initialized, and I doubt it would be much trouble to zero the length field at the same time. Note that this is much different from initializing the entire string storage.
To drag the analogy, initializing the length of a string would be comparable to resetting a file variable to an empty (internal) file, which is not done. But perhaps more important, initializing strings (which are not declared with an explicit initial value) would be non-standard, and encouraging programmers to rely on this leads no more non-portable code. I don't think you'd like this. ;-) Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8