Previous Next Up Title Contents Index Functions Index Top Library

ELEMENT SEARCH

PELEM_SEARCH


CALL SEQUENCE

void pelem_search(
)

TYPES

typedef enum {
	PDIR_BACKWARD,
	PDIR_FORWARD
} Psearch_dir;

typedef struct {
	Pint	num_elem_types;	/* number of element types	*/
	Pelem_type	*elem_types;	/* element types 	*/
} Pelem_type_list;

typedef enum {
	PSEARCH_STATUS_FAILURE,
	PSEARCH_STATUS_SUCCESS
} Psearch_status;

PHIGS STATE

(PHOP, *, *, *).

EFFECT

Searches for the next matching element in the structure struct_id, beginning at the position start_el and proceeding in the specified dir direction. The search stops if an element is found or if the pointer reaches the structure limits.

An element will be selected if its type does not belong to the exclusion set excl and if it belongs to the inclusion set incl.

The PELEM_ALL element means all element types and will normally appear only in the element inclusion list. If an element is both in the inclusion and exclusion sets then it will be excluded.

If the start pointer is less than 1, the search starts at the first sequential element. If the start position is greater than the number of elements in the structure, the search starts from the last sequential element.

ERRORS

2
Ignoring function, function requires state (PHOP, *,*,*)
201
Ignoring function, the specified structure does not exist

SEE ALSO

open structure, incremental spatial search 3, inquire element content, inquire element types and size.


Previous Next Up Title Contents Index Functions Index Top Library