The fsplit procedure
Description
The fsplit procedure splits a filename into its component parts.
Parameter
- The first parameter is an expression of
string type or char type
which contains the filename to be split.
- The second parameter is optional, and if supplied is a reference to the
string variable which will store the directory/folder part
of the filename. If this parameter is not supplied then the directory/folder part of the
filename is not stored.
- The third parameter is optional, and if supplied is a reference to the
string variable which will store the name part of the
filename. If this parameter is not supplied then the name part of the filename is not stored.
- The fourth parameter is optional, and if supplied is a reference to the
string variable which will store the extension part of the
filename. If this parameter is not supplied then the extension part of the filename is not
stored.
Although the second, third, and fourth parameters are optional, at least one of them must be
supplied.
Example
fsplit('/usr/local/bin/readme.txt', d, n, e) stores
'/usr/local/bin' in "d" and
'readme' in "n" and
'.txt' in "e"
fsplit('c:\autoexec.bat', d,,) stores 'c:\' in "d"
Portability
Operating Systems: All
Standard Pascal: No