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

GPQE - Inquire Element Content

GPQE (start, number, errind, ndata, data)

Purpose

Use GPQE to retrieve the current structure element content that is indicated by the element pointer. It will only return the data if the element is an element supported by Version 1 of the graPHIGS API

This subroutine returns the data contained in the current element. The number of bytes in the element and the element contents are returned. The element type can be determined by using the Inquire List of Element Headers (GPQEHD) subroutine (or, to maintain compatibility with previous releases, the Inquire Element Type and Size [ GPQETS] [page GPQETS - Inquire Element Type and Size] subroutine)

To execute this subroutine, a structure must be open.

For information on the format of the data, see The graPHIGS Programming Interface: Technical Reference

If the inquired information is available, then the graPHIGS API sets the error indicator to zero and returns the values in the output parameters. If the error indicator is 543 (the start value exceeds the extent of the available data), then only the total number (totnum) parameter is set. If the inquired information is unavailable, then the error indicator (errind) contains an error number indicating the reason, and the values returned in the output parameters are unpredictable.

Note:

This subroutine exists to maintain compatibility with previous graPHIGS API releases. The format of the data returned is different from that returned with the Inquire List of Element Data (GPQED) subroutine. This subroutine can not return the element content for all the new structure elements that were not supported in graPHIGS API Version 1. For the new structure elements, the Inquire List of Element Data (GPQED) subroutine must be used to get the element content.

Parameters

start -- specified by user, fullword integer

Starting byte offset in the element content (>=1)

number -- specified by user, fullword integer

Number of bytes of the element content requested (>=0)

errind -- returned by the graPHIGS API, fullword integer

Error indicator. If the error indicator is zero, the request has been completed. Otherwise, one of the following errors exists:
4
FUNCTION REQUIRES STATE STOP
526
REQUESTED DATA NOT AVAILABLE FOR THIS FUNCTION
535
CURRENT ELEMENT POINTER IS ZERO
538
START VALUE < ONE
539
REQUESTED NUMBER < ZERO
543
START EXCEEDS DATA EXTENT. TOTAL NUMBER AVAILABLE RETURNED

ndata -- returned by the graPHIGS API, fullword integer

Total number of bytes in the element record.

data -- returned by the graPHIGS API, variable length data

Structure element content. The output array must be large enough to contain the requested data.

Error Codes

None

Related Subroutines

GPQED
Inquire List of Element Data
GPQEHD
Inquire List of Element Headers
GPQETS
Inquire Element Type and Size

RCP code

201337090 (X'0C002902')


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