ProvideX V8.20 > Language Reference > 3. System Functions
497
PFX( ) Function
        Return Prefix Value
Formats
1. Return Specific Prefix: PFX(num)[,ERR=stmtref])
2. Return Prefix for PGN: PFX(PGN[,ERR=stmtref])
Where:
PREFIX number to use. Numeric expression.
num
stmtref
Program line number or label to transfer control to.
Returns
String, current value of given PREFIX.
Description
The PFX( ) function returns the current value of your given prefix number. If no
prefix has been defined, the function will return a null string. If your specific prefix
has been disabled, ProvideX returns an Error #14: Invalid I/O request
for file state. (Use an ERR= option to transfer control on the error.)
You can obtain the PREFIX FILE value by using PFX(-1). The PFX system variable
contains the current PREFIX(0) value.
See Also
PREFIX Directive, p.247,
PFX System Variable, p.566
Example
4000 REM
4010 LET I=-1
4020 LET X$=PFX(I,ERR=4040)
4030 PRINT "PREFIX("+STR(I)+")=",X$
4040 IF I<=8 THEN LET I=I+1; GOTO 4020
4050 PRINT "PREFIX PGN=",PFX(PGN);STOP
->GOTO 4000
->RUN
PREFIX(-1)=
PREFIX(0)=\OTHER\===\ \OTHER\CUST\CASHRCPT\ \OTHER\CUST\MSC\ \OTHER\CUST\SALES\
PREFIX(2)=\MANUALS\===\ \PVX\TESTS\
PREFIX(3)=
PREFIX(4)=
PREFIX(5)=
PREFIX(6)=
PREFIX(7)=
PREFIX(8)=
PREFIX(9)=
PREFIX PGN=\OTHER\PGMS\===\ \OTHER\PGMS\PVX\ \OTHER\PGMS\CUST\