ProvideX V8.20 > Language Reference > 3. System Functions
502
PRM( ) Function
         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 label to transfer control to.
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:
if the switch is off,
0
if the switch is on,
1
if the specified parameter does not exist.
-1
See Also
SET_PARAM Directive, p.304
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