PWAIT (TOUT, WKID, ICL, IDNR)
REAL TOUT
INTEGER WKID INTEGER ICL INTEGER IDNR
If the input queue is empty, GPHIGS waits until an event takes place or until the TOUT expires. If the timeout expires without an event taking place, a NONE value is returned to the input device class. If there is at least one report in the queue, the oldest is removed from the queue and transferred to the PHIGS state list in the current event report. The workstation identifier, the class of input device and logical input device number are returned and the associated values are made available for interrogation by a function of type GET <input class>.
Note:
1) Operation takes place even if the event queue is full (error 256).
2) A timeout value less than or equal to zero causes the queue to be immediately scanned and a NONE value is returned if the queue is empty.
3) Some systems do not provide an efficient timeout function; in this case, a non-zero timeout value can cause an infinite wait.
Example:
C Get next event into the PHIGS event queue ; return without waiting if queue is empty REAL TOUT INTEGER WKID,ICL,IDNR ...... TOUT = 0. call PWAIT(TOUT,WKID,ICL,IDNR) ......