Re: Object-oriented programming in standard ANSI C



Laurent Deniau wrote:

defmethod(OBJ, gPutAtIdx, (Array, Object), (int)idx)
{
if (0 > idx && idx >= self1->len) {
useclass(ExOutOfBound);
gThrow(gNewWithStr(ExOutOfBound, "invalid array index"));
}

if (self1->data[idx] != self2) {
if (self1->data[idx] != NIL)
gRelease(self1->data[idx]);

self1->data[idx] = gRetain(self2);
}

retmethod(self1);
}

Sorry this closing brace must be replaced by 'endmethod' and its corresponding openning brace must be removed.

a+, ld.
.