Emil Jerabek wrote:
CBFalconer wrote:
Sure, it is completely pointless, except that it _is_ mandated by the standard. Namely, section 6.4.3.4 (Record-types) of ISO 10206 says:
TYPE per = ^emptyrecord; VAR erarray : ARRAY[1..N] OF emptyrecord;
... new(per); erarray[i] := erarray[j]; erarray[i] := per^; per^ := erarray[i]; dispose(per);
Well, what's the problem here? All these assignment statements are simply no-ops.
Indeed.
Accepting that has further problems with the design of the memory allocation mechanism - I have just built one for DJGPP and had to detect a zero size and increment it, otherwise storage needed for free block tracking would have been missing. The ramifications of an empty object go on and on and on and ....
Well, GPC's memory management works with size 0 at least. That's not the problem.
Frank