| |
|
| Formats |
Where:
| chan |
Channel
or logical file number of file whose pathname is
to be returned. |
| filename$ |
String
containing a file name for a file whose existance
is to be validated and full pathname is to be
returned. |
| stmtref |
Program
line number or statement label to which to
transfer control. |
|
| |
|
| Returns |
| Format
1 |
Pathname of open
file specified by the value in chan. |
| |
|
| Format
2 |
Full pathname of
the file specified in the filename. If
the file does not exist an error #12 - File not
found - exception is generated. Any file name
that starts with an asterisk (system file) or
square bracket (ODBC, remote, or other special
file type) is NOT validated but simply returned
to the application. |
| |
|
| Format
3 |
Pathname of the
current data dictionary file open. |
|
| |
|
| Description |
The
PTH( ) function returns the operating
system path of the file specified. (The value returned is
an ASCII string reporting the full pathname, including
directories and the filename.) If the file is a device
(e.g., a printer), the device name is returned. |
|
|
| *Note* |
The
file must be open for format 1 of the PTH( )
function to operate. |
|
|
| |
|
| Example |
With
"C:\usr\ar"as current directory:
0010 OPEN
(26)"PRODFL"
0020 PRINT "Just opened
file: ",PTH(26)
0030 .... RUN
Just opened file:
C:\usr\ar\PRODFL
PTH( ) returns
the device name when the file is a device:
-:OPEN (30)PRINTER$
-:?PTH(30) LPT1 |