-> I'm just getting back into Basic programming and I've run into a
-> problem. Take a look at this code:
-> dim OneLine as string
-> dim FileHandle1 as Integer
-> FileHandle1 = FreeFile
-> Open "FD.LOG" for input as FileHandle1
-> While not(EOF(FileHandle1))
-> Line Input FileHandle1, OneLine
-> 'Line Input #1, OneLine
-> Wend
Change: Line Input FileHandle1, OneLine
To: Line Input #FileHandle1, OneLine
Without the '#' sign, LINE INPUT thinks you are trying to read a LINE
INPUT into two variables (whis is not possible). The '#' lets the
compiler know that you are referring to a file handle.
Daniel at DSE
---
þ DSE Online! þ The Home of PB/VISION(tm) PRO for PowerBASIC 3.x
--- WILDMAIL!/WC v4.10
---------------
* Origin: DSE Software Publishing BBS þ 707-459-4484 þ (1:125/123.0)
|