1 //========================================================================
5 // Copyright 1996 Derek B. Noonburg
7 //========================================================================
10 #pragma implementation
18 //------------------------------------------------------------------------
20 //------------------------------------------------------------------------
31 for (i = 0; i < length; ++i)
36 void Array::add(Object *elem) {
37 if (length + 1 > size) {
39 elems = (Object *)grealloc(elems, size * sizeof(Object));
41 elems[length] = *elem;
45 Object *Array::get(int i, Object *obj) {
46 return elems[i].fetch(obj);
49 Object *Array::getNF(int i, Object *obj) {
50 return elems[i].copy(obj);