The connection identifier is used to associate a particular physical device or file with a GKS workstation. The mechanism used depends on the type of workstation; for all workstations except the X windows workstation, the connection identifier is used as the FORTRAN logical unit for output, and for interactive workstations the next logical unit (connection identifier) is used for input. Note that on most UNIX system, logical units 0, 5 and 6 are pre-connected to ‘standard error’, ‘standard input’ and ‘standard output’ respectively and so 5 should be used to connect a workstation to your terminal and 0 and 6 not at all.
The device or file name associated with a connection identifier can be specified by creating an
environment variable of the form GCONnn
, where nn is the connection identifier (with a leading zero if
necessary) which translates to the device or file name. For example, to connect a workstation to a file
called myplot.ps
on unit 9 you would type:
If not such environment variable exists then the usual default file names for FORTAN i/o will be used
(typically fort.n
).
The X windows driver ignores the connection identifier.