Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ pels(3g) — PHIGS 5.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PELS(3g)  —  Subroutines

Name

PELS − Searches for the next matching element in the specified structure. 

Operating States: PHOP, ∗, ∗, ∗
PHIGS standard function

Syntax

PELS (STRID, STRTEP, SRCDIR, EISN, EIS, EESN, EES, ERRIND, STATUS,
FNDEP)

Argument     Data Type       Access   Description
---------------------------------------------------------------------------
STRID        Integer         Read     Structure identifier
STRTEP       Integer         Read     Starting element position within the
                                      list
SRCDIR       Integer         Read     Search direction
EISN         Integer         Read     Number of elements in the inclusion
                                      set
EIS(EISN)    Integer         Read     Element inclusion set
EESN         Integer         Read     Number of elements in the exclusion
                                      set
EES(EESN)    Integer         Read     Element exclusion set
ERRIND       Integer         Write    Error indicator
STATUS       Integer         Write    Status indicator
FNDEP        Integer         Write    Position of the found element
---------------------------------------------------------------------------

See Constants for the list of element types.

Constants

Defined Argument   Constant    Description
---------------------------------------------------------------------------
SRCDIR             PBWD        Backward search
                   PFWD        Forward search
STATUS             PFAIL       Search failed
                   PSUCC       Search was successful
---------------------------------------------------------------------------

Description

PELS searches for the next matching element in the specified structure, beginning at the specified start point and continuing in the specified search direction. The search ends when the element is found, or when the function reaches the limits of the structure. 

The function will select an element if it is not a member of the element exclusion set and is a member of the element inclusion set.  If an element is included in both the inclusion and exclusion sets, the function excludes the element. 

If the start position is less than 0, the function begins the search at element 0.  If the start position is greater than the number of elements in the structure, the function begins the search at the last element in the open structure. 

If the search succeeds, the function returns the status indicator PSUCC, and FNDEP points to the matching element.  If the search fails, the function returns the PFAIL status indicator and the value of the FNDEP is implementation-dependent. 

See Also

PISS
PSEP

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026