System Functions
PRM( ) Return Parameter Value
 
Format PRM(param[,ERR=stmtref])
 
Where:
 
param Two-character valid system parameter code, enclosed in single quotes. See the section on accepted system parameters. String expression.
 
stmtref Program line number or statement label to which to transfer control.
 
Returns Current value of system parameter, or status code if switch.
 
Description The PRM( ) function returns the current value of the specified system parameter unless the parameter is a switch. The following numeric status codes are returned for a switch:
 
0 if the switch is off,
1 if the switch is on,
-1 if the specified parameter does not exist.
 
See Also SET_PARAM Directive
 
Examples This temporarily changes the 'BY' parameter to obtain a new date:
 
0100 PRINT "Valentine days.."
0110 LET SV_BY=PRM('BY')
0120 FOR Y=1999 TO 2009
0130 SET_PARAM 'BY'=Y
0140 PRINT DTE(31+14-1:"%Dl %Ml %D/%Y")
0150 NEXT Y
0160 SET_PARAM 'BY'=SV_BY
-:run
Valentine days..
Sunday February 14/1999
Monday February 14/2000
Wednesday February 14/2001
Thursday February 14/2002
Friday February 14/2003
Saturday February 14/2004
Monday February 14/2005
Tuesday February 14/2006
Wednesday February 14/2007
Thursday February 14/2008
Saturday February 14/2009
 
PRM( ) returns a specific parameter's current setting (or the Boolean value for a switch):
 
->?prm('ah')
0
->set_param 'ah'
->?prm('ah')
1
The parameter’s status is returned even when it's hidden from the PRM variable's contents listing:
 
->?prm('!i') ! hidden unless ON
0