RemoveNthFromObject

Removes the nth element of a collection.

Synopsis

Err RemoveNthFromObject( CObject *obj, int32 n )

Description

This is a method macro that is part of the Juggler object-oriented toolbox. An object's method can be called explicitly through the class structure function pointer or with one of the defined method macros. This method macro removes the reference to the nth element (a sequence or a collection) of a collection. Numbering starts from 0.

Note that using this function to remove a sequence or collection from a higher collection doesn't delete the sequence or collection, but merely removes its reference in the higher collection so that the element is no longer part of the collection.

Arguments

obj
A pointer to the CObject data structure for the object.
n
A value indicating the element to remove, starting at 0.

Return Value

This macro returns 0 if successful or an error code (a negative value) if an error occurs.

Implementation

Macro implemented in cobj.h V20.

Associated Files

cobj.h, music.lib

See Also

SetObjectInfo(),GetObjectInfo(),StopObject(), AllocObject(), FreeObject(),GetNthFromObject(), PrintObject(), StartObject()