Posts: 77
Threads: 27
Joined: Dec 2004
Forgive me if I'm making a fool of myself by asking a question already proposed elsewhere, but I've found that, in FB 0.12, the LINE INPUT statement stops the compiler, with the error: "foo.bas(06) : error 10: Expected '=', found: 'input'"
Here's the (small portion of) code:
Code:
do while not eof(fh)
line input #fh, curline
curline = trim$(curline)
I'm puzzled.
Posts: 1,439
Threads: 15
Joined: Apr 2003
I just compiled this with 0.12b without any errors:
Code:
dim fh as integer, curline as string
fh = freefile
open "blah.txt" for input as #fh
do while not eof(fh)
line input #fh, curline
curline = trim$(curline)
loop
Close #fh
Perhaps you could post some more code (the definition of curline, for example).
Posts: 922
Threads: 15
Joined: Jun 2003
Using Allegro? LINE was removed from the keywords list (using OPTION NOKEYWORD at the top of allegro.bi), as Allegro uses ordinary names like that..
Posts: 77
Threads: 27
Joined: Dec 2004
Hey, thanks, I never thought of that. But, isn't that a bit pointless when Allegro's line command was ported as draw_line, and wasn't changed, even though nokeyword ..., line, ... was used?
Might want to play with that a bit. :-)
Posts: 1,774
Threads: 62
Joined: Aug 2003
Since you're speaking of line input...
Open the file in binary mode for a major speed boost in read time.
Hopefully this is a feature, and not a bug because it works great!
Posts: 1,439
Threads: 15
Joined: Apr 2003
Quote:... But, isn't that a bit pointless when Allegro's line command was ported as draw_line, and wasn't changed, even though nokeyword ..., line, ... was used?
It's been changed to 'line' for the next release.
Posts: 77
Threads: 27
Joined: Dec 2004
Then is FB 0.13 capable of processing "line input" without seeing a single token ("line")? If not, then your use of this will stop LINE INPUT from functioning, as it did for me.