Note: This class is present mostly for compatibility with ICpak101. You most likely want to use OrdCltn instead of this class.
+ newCreates an instance whose value is set to the empty array.
See also: - strCopy
new:
+ new :(unsigned) n
Creates an instance of n nil objects.
with:
+ with :(unsigned) nArgs,...
Creates an instance of nArgs objects, using a variable number of arguments, that may contain nil objects.
id myArray = [IdArray with:3,nil,[Object new],nil];
copy
- copy
Returns a copy of the receiver with its internal C array copied as well.
deepCopy
- deepCopy
For this class, this method acts as copy.
free
- free
Frees the receiver and its internal C array as well.
size
- (unsigned) size
Returns the number of actual characters in the array, excluding the NULL terminator.
at:
- at :(unsigned) anOffset
Returns the object at anOffset or generates an error if anOffset is greater than the length of the C array.
at:put:
- at :(unsigned) anOffset put : anObject
Replaces the object at anOffset with anObject and returns the old object which was in that location. Generates an out of bounds exception if anOffset is greater than the length of the array.
printOn:
- printOn :(IOD) aFile
Prints the array to aFile without appending a newline. Returns the receiver.
fileOutOn:
- fileOutOn : aFiler
Writes the array on aFiler. Returns the receiver.
fileInFrom:
- fileInFrom : aFiler
Reads a array object from aFiler. Returns the receiver.