System Functions
OPT( ) Return File Open Options
 
Format OPT(chan[,ERR=stmtref])
 
Where:
 
chan Channel or logical file number of the file to reference.
 
stmtref Program line number or statement label to which to transfer control.
 
Returns Value used in OPT= option.
 
Description The OPT( ) function returns the value used in the OPT= option of the OPEN directive for the given file. If the file referred to in the OPT( ) function is not open, ProvideX returns an Error #13: File access mode invalid. If you omitted the OPT= option for an open file, the OPT( ) function returns a null string.
Use this function primarily with device drivers to deal with such processes as generating banners and multiple copies.
 
See Also OPEN Directive.
 
Example 00040 ! Report OPT( ) value for open COM port:
00050 LET settings$="9600,n,8,1,x"
00060 LET port$="COM2"
00070 OPEN (1,ISZ=1,OPT=settings$)port$
00080 PRINT OPT(1)
00090 END
-:run
9600,n,8,1,x