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

GPCPER - Copy Element Range

GPCPER (strid, elem1, elem2)

Purpose

Use GPCPER to copy a range of elements from a specified structure and to insert the range of elements into the open structure following the current element pointer. The element pointer moves to the last element copied into the open structure.

  • If the value for elem1 is greater than the value for elem2, then the values are swapped. (The element range always starts at the lowest value and ends at the highest value.)

  • If both values point beyond the last element of the specified structure or if both values are less than one, then the graPHIGS API does not perform the copy.

  • If one of the values is less than one, then the value defaults to a value of one.

  • If one of the values is greater than the number of elements in the specified structure, then the element number of the last element in that structure is used instead.
  • The value of the edit mode set by GPEDMO does not affect the functionality of this subroutine.

    If the elements to be copied contain an execute structure-type element that references the open structure, then the graPHIGS API issues an error message and does not perform the copy.

    Parameters

    strid -- specified by user, fullword integer

    Identifier of the structure which has elements that are copied.

    elem1 -- specified by user, fullword integer

    Element number of the first element to copy.

    elem2 -- specified by user, fullword integer

    Element number of the last element to copy.

    Error Codes

    4
    FUNCTION REQUIRES STATE STOP
    125
    ATTEMPTING TO EXECUTE THE OPEN STRUCTURE

    Related Subroutines

    GPCEXS
    Conditional Execute Structure
    GPCPST
    Copy Structure
    GPEXST
    Execute Structure

    RCP code

    201338626 (X'0C002F02')


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