home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR9
/
WDOS0793.ZIP
/
LESSER.ZIP
/
DEMOFIND.BAS
next >
Wrap
BASIC Source File
|
1993-05-28
|
891b
|
28 lines
' demofind.bas - a demonstration driver for FINDIR.ASM
' compiled with BC 7.1, switch "/O"
' linked with LINK 5.1 to FINDIR, NOFLTIN, NOCOM and NOLPT
' switches "/E/NOE"
declare function findir$ ()
defstr f,t
if len(findir) = 0 then 'Too early version of DOS
print "This program requires DOS 3.0 or later"
end 'Abnormal termination
end if
let filename = findir + "testfile"
if len(dir$(filename)) = 0 then 'Not there yet?
print tab(5) findir"TESTFILE didn't exist, ";
open filename for output as #1
let text = "TESTFILE exists"
print #1, text
close #1
print "but now it has been written."
else
open filename for input as #1
line input #1, text
print tab(5) findir; text
endif
end