7.8.1 SWpGET/SWpSET(SWpSTX)/SWCGET/SWCSET(SWCSTX)

1.
Function
SWpGET/SWpSET(SWpSTX) inquires/changes an integer, floating-point number, or logical-type internal variable, and SWCGET/SWCSET(SWCSTX) inquires/changes a character-type internal variable. (SWpSTX/SWCSTX  permits changes with a runtime option.)
2.
Call
CALL SWpGET(CP,IPARA)
CALL SWpSET(CP,IPARA)
CALL SWpSTX(CP,IPARA)
CALL SWCGET(CP,CPARA)
CALL SWCSET(CP,CPARA)
CALL SWCSTX(CP,CPARA)

3.
Explanation of Arguments
CP (C*8) The name of an internal variable
IPARA (I,R,L) The value of an internal variable (integer, floating-number, or logical-type)
CPARA (C*(*)) The value of a (character-type) internal variable



Below is a list of names that can be specified as CP for a graphics output device provided as standard by the DCL (X server, postscript, Tek terminal). The values for integer, floating-point, or logical  variables are specified using SWpGET/SWpSET(SWpSTX); the values for character-type variables are specified using SWCGET/SWCSET(SWCSTX).



The values of internal variables indicating file names of databases such as 'FONT1', 'CL2TN' may not be used as the actual file names. The actual file names are determined by SWQFNM. However, the parameter name must be defined to provide a hint for the file name. In the standard library, the current directory is searched first. Then, the directory indicated by the internal variable  'DUPATH' (pathname specified by user) handled by GLCGET/GLCSET is searched. Finally, the directory indicated by the internal variable DSPATH' (pathname provided by the system) is searched.



Also, file names with suffixes such as .x11, .psx, which indicate that these are output-device-dependent may be given priority. For example, when searching for a file name 'CLRMAP'  in the standard library and the selected output device is the X server, file names with the suffix .x11 will be searched first. Then, file names without suffixes will be searched, and then finally, those with the suffix .psx  will be searched for. If the selected output device is postscript, then file names with the suffix .psx will be searched first, then file names without suffixes, and then finally, those with the suffix .x11.



[Parameters Common for All Output Devices] - These internal variable names must be defined regardless of the output device on which SWPACK is realized

'MAXWNU' (I) The number of output devices SWPACK is realized on. The value of the standard library is 3 (X,PS,Tek).
'IWS' (I) The opened device number. Specify a value between 1 and 'MAXWNU'. (The initial value is 1.) This number is specified with SGOPN.
'WSNAMEnn' (C) The name of the workstation. (a value between 1 and 'MAXWNU'). The values in the standard library are 'WSNAME01'='X' (X server), 'WSNAME02'='PS' (postscript), and 'WSNAME3'='Tek'.
'FONTn' (C) The font file name (n = 1 or 2). The values in the standard library are 'FONT1'='font1u' and 'FONT2'='font2u'.
'CL2TN' (C) A file name for converting the color number into tone pattern index. The value in the standard library is 'cl2tnmap'.



[Parameters Common for X server (X) and Postscript (PS)]


'IWIDTH' (I) The horizontal size of the image window. (Default value is 900.)
'IHEIGHT' (I) The vertical size of the image window. (Default value is 650.) In X, a window with dimensions of 'IWIDTH' and 'IHEIGHT' is opened. In PS, a frame with the aspect ratio of 'IHEIGHT':IWIDTH' with maximum size is inscribed in the available frame area. 
'FNAME' (C) The name of the output file. (Default value is 'dcl'.) When this value is '*' or empty  the name of the current program is used. When the file name stands for the dump file of X or for the file for multiple-page output in PS, '_nnn' is added to the program name (nnn is the page number). Plus, for the dump file in X, the suffix '.xwd', and for the PS file, the suffix '.ps' is added to the name.
'TITLE' (C) The title name. (Default is '*'.) When this value is '*' or empty, the version name returned by DCLVNM (see MISC1/MISKLIBX is used. In such a case, the title name will be used as the title for the window. For PS, the title name is printed in the Creator field in the comment space.
'CLRMAP' (C) The file name containing the color map. The value in the standard library is 'colormap'.


  
[Parameters For X Server (X)]


'IPOSX' (I) The X coordinate of the window position. (Default value is -999.)
'IPOSY' (I) The Y coordinate of the window position. (Default value is -999.) When (IPOSX,IPOSY) = (-999,-999), the position is specified by the user with a mouse.
'LWAIT' Specifies whether a pause is placed at page break. A pause is present if .TRUE; No pause if .FALSE.. (Default value is .TRUE.)
'LWAIT0' (L) Specifies whether a pause is placed when an device is opened. A pause is present if .TRUE.; No pause if .FALSE. (Default value is .FALSE.)
'LWAIT1' (L) Specifies whether a pause is placed when an device is closed. A pause is present if .TRUE; No pause is .FALSE. (Default value is .TRUE.)
'LDUMP' (L) Specifies whether a dump file for X (xwd) is created. Created when .TRUE; Not created when .FALSE. (Default value is .FALSE.)
'LALT' (L) Specifies whether graphics are drawn on the reverse screen. Drawn when .TRUE; Not drawn when .FALSE. (Default value is .FALSE.)
'LKEY' (L) Specifies whether input from keyboard will be effective during a pause. Effective if .TRUE; Not effective if .FALSE. (Default value is .TRUE.)
SP, RETURN : Go to next page.
s : Change 'LWAIT' to .FALSE.
w : Change 'LWAIT' to .TRUE.
d : Create a dump file.
q : Quit execution.
'BITMAP' (L) The file name containing the bitmap. The value in the standard library is 'bitmap'.



[Parameters for Postscript (PS)]

'LCOROL' (L) Specifies whether to output a PS file for color devices. For color if .TRUE;For monochrome if .FALSE. (Default value is .TRUE.)
'LSEP' (L) Specifies whether a separate file will be outputted for each page. Separated if .TRUE.; Not separated if . (Default value is .FALSE.)
'LPRINT' (L) Specifies whether the created output file will be directly outputted to the printer. Printed when .TRUE.; Not printed when .FALSE. (Default value is .FALSE.)
'LPR' (C) Specifies the print command to be used when 'LPRINT' is set to .TRUE. (Default value is 'lpr'.)


[Parameters for Tek Terminals (Tek)]
'LWAIT' (L) Specifies whether a pause is placed at page break. A pause is present when .TRUE.; No pause when .FALSE. (Default value is .TRUE.)
'NLNSIZE' (I) Specifies the length of a single line in the console of the Tek screen. (Default value is 21.)

4.
Notes
(a)
The following are subroutines for handling internal variables. Only the subroutine names will be given here.
SWPQNP SWPQID SWPQCP SWPQVL SWPSVL
SWCQNP SWCQID SWCQCP SWCQVL SWCSVL
(b)
SWpGETcalls the above SWPQID to determine the location of an internal variable, and inquires the value by SWPQVL. SWpSET calls SWPQID to determine the location of an internal variable and inquires the value by SWPSVL. Therefore, if the specified internal variable is not found, an error message is printed.
(c)
SWCGET calls the above SWCQID to determine the location of an internal variable and inquires the value by SWCQVL. SWCSET calls SWCQID to determine the location of an internal variable and inquires the value by SWCSVL. Therefore, if the specified internal variable is not found, an error message is printed by SWCQID.
(d)
An appropriate type of constant or an internal variable should be specified for IPARA.