Dim hFile As Stream
Dim sline As String
Dim linecntr As Integer
hFile = Open FMain.appDefPath & FMain.projectPath & projectName & "/dtls.txt" For Input ' this opens
linecntr = 0
While Not Eof(hFile)
Line Input #hFile, sline
Print sline
Print Chr(13)
Print linecntr
sline = ""
Wend
This file contains this data:
aaaaaaaa
bbbbbb
cccc
dd
And the result that I am getting is :
ddccbbaa
That means, that the line input command is reading all the lines one by one, and storing them in the same variable, without executing the next instructions in the while loop.
Why is this? What am I doing wrong?
Gambas 3.14.2 pi