FORTRAN Reference Manual
Utility Routines
FORTRAN Reference Manual—528615-001
15-20
SSWTCH Routine
SSWTCH Routine
SSWTCH returns the current value of a program switch.
switch-number
is a type INTEGER*2 variable that specifies which switch’s value to return.
result
is a type INTEGER*2 variable in which SSWTCH stores the current value of switch 
switch-number.
Considerations
•
Use SSWTCH only in programs compiled with ENV COMMON. The FORTRAN 
compiler does not report an error if you use SSWTCH with ENV OLD but the 
FORTRAN run-time library returns a switch value of two if your program executes 
SSWTCH in a module that specifies ENV OLD. See the following table for 
additional meanings of a switch value of two.
•
You set switch values using a TACL PARAM command.
PARAM SWITCH- nn 
•
SSWTCH returns:
CALL SSWTCH ( switch-number, result)
Switch Value Meaning
1 Switch is ON
2 Any of the following:
•
Switch is OFF
•
switch-number is less than 1 or greater than 15
•
The program was not compiled with ENV COMMON
ON
OFF










