CBFalconer wrote:
Frank Heckenbach wrote:
... snip ...
If what you mean is treating the string as an array of char and indexing out of range, this would be a matter of range-checking(*) -- I'm not sure if you mean this, that's why it's always a good idea to include some example code!
(*) which GPC is currently lacking. I wrote a mail about it on 2002-12-14, but there doesn't seem to be much interested from the users.
Because there isn't any rangechecking. Pascal is not complete without runtime rangechecks, IMO.
The standard says:
: 6.4.6 AssignmentÂcompatibility : : [...] : : At any place where the rule of assignmentÂcompatibility is used : : a) it shall be an error if T1 and T2 are compatible ordinalÂtypes and the : value of type T2 is not in the closed interval specified by the type : T1;
: 3.2 Error : : A violation by a program of the requirements of this International Standard : that a processor is permitted to leave undetected.
You're entitled to your opinion, of course, and range checking may be a desirable feature, but from a standards point of view, it's no more essential than many other runtime checks GPC currently doesn't do (some of which would be very hard to implement, such as anonymous variant checks and pointer reference checks) ...
Frank