/* a d d I n d e x  */
returnValue Bounds_addIndex(Bounds *_THIS, Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
/* a d d I n d e x  */
returnValue Bounds_addIndex(Bounds *_THIS, Indexlist *const indexlist, int newnumber, SubjectToStatus newstatus)
{
	if ( _THIS->status != 0 )
	{
		if ( _THIS->status[newnumber] == newstatus )
			return THROWERROR( RET_INDEX_ALREADY_OF_DESIRED_STATUS );
		_THIS->status[newnumber] = newstatus;
	}
	else
		return THROWERROR( RET_ADDINDEX_FAILED );
	if ( indexlist != 0 )
	{
		if ( Indexlist_addNumber( indexlist,newnumber ) == RET_INDEXLIST_EXCEEDS_MAX_LENGTH )
			return THROWERROR( RET_ADDINDEX_FAILED );
	}
	else
		return THROWERROR( RET_INVALID_ARGUMENTS );
	return SUCCESSFUL_RETURN;
}