A LINKING AND RUNNING SGS

A program can be linked with SGS by:

  f77 prog.f -L/star/lib ‘sgs_link‘

Adam application are linked with SGS by putting ‘sgs_link_adam‘ on the alink command line.

Workstation names are translated to their GKS equivalents using the ‘Graphics Name Service’ (xrefSUN/57sun57). A list of those names defined on your system can be output to your terminal by running the program /star/bin/examples/sgs_workstations4. In addition to the system defined names an explicit GKS workstation type and connection identifier can be used. Examples of valid strings are:

  "GKS_102_0"
  "201"
  "201,1"
  "103 0"

SGS can be opened without further ado by supplying SGS_OPEN with such a string, but more friendly names can be created with environment variables. For example after executing the C shell command:

  % setenv t4010 GKS_201

the name ‘t4010’ can be used to open a Tektronix 4010 as a workstation. When defining logical names you are advised to use the GKS_ prefix to distinguish them other environment variables and to use an underscore or comma as the separator as the space is used as a separators by most shells.

The connection identifier indicates which of several devices of the same type to use. For devices which are terminals, 5 indicates your own terminal. For other devices 0 will be a ‘default’ device of some sort. For connection identifiers other than zero, GKS will attempt to translate the environment variable GKS_n_m (where n is the workstation type and m is the connection identifier) in order to find the name of the device to use.

You should refer to the GKS documentation for precise details of the mapping of connection identifiers to device names for any particular device type.

4if you are using this software on a non-starlink machines you may have to replace /star by some other path name.