556
DLM System Variable
Return System Directory Delimiter
String System Variable
Contents
String, operating system's directory delimiter.
Description
This system variable contains the operating system's directory delimiter (e.g., "/"...
for UNIX, "\"... for DOS). For example, on a Windows PC:
->?DLM
\
Tip: Use SEP=DLM when reading directories (e.g., in list boxes) to have ProvideX
append the operating system delimiter to subdirectory names.
Examples
The following is a tree view list box example.
0010 LIST_BOX 10,@(5,5,25,10),OPT="e|",
0010:FMT="{!diskette|!File|!File_open}",SEP=DLM
0020 LET F=1,D$="."
0030 NXTDIR:
0040 OPEN (F)D$
0050 NXTFILE:
0050:READ (F,END=ENDDIR)F$
0060 IF F$(1,1)="."
0060:THEN GOTO NXTFILE
0070 IF MID(F$,-1)<>DLM
0070:THEN LIST_BOX LOAD 10,0,PTH(F)+DLM+F$;
0070:GOTO NXTFILE
0080 LET D$=PTH(F)+DLM+F$
0090 F++
0100 GOTO NXTDIR
0110 ENDDIR:
0110:CLOSE (F)
0120 F--
0130 IF F>0
0130:THEN GOTO NXTFILE
0140 ESCAPE