06-12-2003, 11:49 PM
The OPEN file command in my code gives me an bad file error. The file path is fine, the file name is fine. I thought my open statement was correct, but I'm probably wrong. Can someone tell me what I'm doing wrong? (My data file is sequential and has four fields.) Please help!
Code:
DIM atmcount AS SINGLE
DIM Anam(20) AS STRING * 15
DIM Aact(20) AS STRING * 10
DIM Abal(20) AS SINGLE
DIM Apin(20) AS SINGLE
atmcount = 0
OPEN "a:\file.txt" FOR INPUT AS #Atmfile
DO WHILE atmcount < 20 AND NOT EOF(Atmfile)
atmcount = atmcount + 1
INPUT #Atmfile, Anam(atmcount)
INPUT #Atmfile, Aact(atmcount)
INPUT #Atmfile, Apin(atmcount)
INPUT #Atmfile, Abal(atmcount)
LOOP
CLOSE #Atmfile