az_human
September 11th, 2006, 01:05 AM
So I'm fiddling around with Gambas (1.0.13) and trying to open a stream to a file using the stock example provided on the documentation wiki:
----------------------------------
DIM hFile AS File
DIM sLine AS String
hFile = OPEN "/home/userhere/filehere.txt" FOR INPUT
WHILE NOT Eof(hFile)
LINE INPUT #hFile, sLine
PRINT sLine
WEND
----------------------------------
The above would respond to a simple event such as a button click. However, when I try and run the app, it immediately gives me:
Syntax error at line 11 in Form1.class
The line number refers to the "hFile = OPEN...." line.
As I said, I'm extremely new to Gambas, but it looks fun. Trying to get the hang of the simple stuff.
Thanks in advance for anybody who can provide any input to the syntax error.
----------------------------------
DIM hFile AS File
DIM sLine AS String
hFile = OPEN "/home/userhere/filehere.txt" FOR INPUT
WHILE NOT Eof(hFile)
LINE INPUT #hFile, sLine
PRINT sLine
WEND
----------------------------------
The above would respond to a simple event such as a button click. However, when I try and run the app, it immediately gives me:
Syntax error at line 11 in Form1.class
The line number refers to the "hFile = OPEN...." line.
As I said, I'm extremely new to Gambas, but it looks fun. Trying to get the hang of the simple stuff.
Thanks in advance for anybody who can provide any input to the syntax error.