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

SAMPLE CHOICE (PHOP,WSOP,*,*)

Purpose

Use Sample Choice to immediately retrieve the current measure of the specified choice device.

If the measure of the choice device indicates no choice, then the graPHIGS API returns a status of NOCHOICE. Otherwise, the graPHIGS API returns a status of OK together with a choice number which is set according to the current measure of the choice device.

Language Bindings

C

psample_choice (ws_id, choice_num, choice_in_status, choice)

Input Parameters

Pint ws_id
Workstation identifier.

Pint choice_num
Choice device number (>=1).

Output Parameters

Pin_status *choice_in_status
Choice input status (1=PIN_STATUS_OK, 2=PIN_STATUS_NO_IN).

Pint *choice
Choice number.

FORTRAN

PSMCH (wkid, chdnr, stat, chnr)

Input Parameters

integer wkid
Workstation identifier.

integer chdnr
Choice device number (>=1).

Output Parameters

integer stat
Choice input status (1=POK, 2=PNCHOI).

integer chnr
Choice number.

Errors

3
Function Requires State (PHOP,WSOP,*,*)
54
Specified Workstation Is Not Open
61
Specified Workstation Is Not Of Category Input Or Outin
250
Specified Device Not Available On Workstation
251
Function Requires Input Device To Be In Request Mode

Related Subroutines

  • Inquire Number Of Available Logical Input Devices

  • Set Choice Mode


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