Adam Naumowicz wrote:
I've just noticed that there is a bug in the string assignment if a string is passed by value to a procedure and then assigned to.
It's not a bug. `String' is a schema type which adjusts to the actual parameter. In this case it has a capacity of 1 (since the value passed is a constant, the capacity is set equal to its length). So assigning anything longer will not fit. (Or to express it low-level, as some people seem to prefer: How much space should the compiler allocate on the stack for the parameter? It can't know in advance how long a value you're going to assign to it.) If you're used to BP where `String' means `String [255]', you might want to write so (or you might want to use `TString' from module GPC which is a bit longer). But any fixed length may, of course, overrun, unless you've verified what you're actually assigning to it ... 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: 51FF C1F0 1A77 C6C2 4482 4DDC 117A 9773 7F88 1707