[ Previous | Next | Contents | Glossary | Home | Search ]
The graPHIGS Programming Interface : Subroutine Reference

GPCRET - Conditional Return

GPCRET (mask, crit)

Purpose

Use GPCRET to insert a Conditional Return structure element into the open structure following the element pointer or to replace the element pointed at by the element pointer with a Conditional Return structure element depending on the current edit mode.

If the current condition flags selected by the mask parameter satisfy the specified criteria, then the traversal of the current structure is terminated and the traversal of the parent structure is resumed. Otherwise, no action is taken, and the element count is incremented.

The condition flag is a 32-bit bit string. Each bit is defined as follows:

    0                        15  16                       29  30     31
    --------------------------------------------------------------------------
    |                           |                            | cull |  prune |
    | reserved for application  |          reserved          | flag |  flag  |
    --------------------------------------------------------------------------
  High bit                                                               Low bit
GPCRET is identified as GSE 1005.

Note:

Not all GSEs are supported on all workstations. Use the Inquire List of Generalized Structure Elements (GPQGSE) inquiry subroutine to determine the GSEs supported by an open workstation. See also the workstation descriptors described in The graPHIGS Programming Interface: Technical Reference

Parameters

mask -- specified by user, fullword integer

Mask specifying flags to be tested in the current condition flag.

crit -- specified by user, fullword integer

Criteria to be satisfied when the set of flags in the specified mask is tested against the current condition flag (1=ALL_ONES, 2=ALL_ZEROS, 3=NOT_ALL_ONES, 4=NOT_ALL_ZEROS )

Error Codes

5
FUNCTION REQUIRES STATE STOP OR NROP (NOT STCL)
123
CONDITION CRITERIA IS INVALID

Related Subroutines

GPCOND
Set Condition
GPCEXS
Conditional Execute Structure
GPTEX2
Test Extent 2
GPTEX3
Test Extent 3

RCP code

201331717 (X'0C001405')


[ Previous | Next | Contents | Glossary | Home | Search ]