This section consists of a complete program using SGS. This and another (longer)
program are available on disc in the files /star/share/sgs/sgsx1.f
and
/star/share/sgs/sgsx2.f
.
PROGRAM SGSX1
*-
*
* - - - - - - - -
* S G S X 1
* - - - - - - - -
*
* USES SGS PACKAGE TO DRAW BOX WITH ’STARLINK’ WRITTEN IN IT
*
*-
CHARACTER*20 WKSTN
INTEGER IZONID, IZ, J
* Print list of workstation names
CALL SGS_WLIST (6)
* Get workstation type & number
PRINT *, ’WORKSTATION?’
READ (*,’(A)’) WKSTN
* Open
CALL SGS_OPEN (WKSTN, IZONID, J)
* Declare a square zone
CALL SGS_ZSHAP (1.0, ’BL’, IZ, J)
* Box
CALL SGS_BOX (0.1, 0.9, 0.4, 0.6)
* Message
CALL SGS_SHTX (0.1)
CALL SGS_STXJ (’CC’)
CALL SGS_BTEXT (0.5, 0.5)
CALL SGS_ATEXT (’STARLINK’)
* Wrap up
CALL SGS_CLOSE
END