[Gambas-user] Error in file read when length is a negative value ?
bagonergi at gmail.com
Sun Jan 17 14:53:00 CET 2021
Il giorno dom 17 gen 2021 alle ore 10:03 Vinode Singh Ujlain <
ujlain at gmail.com> ha scritto:
> EOF .. I was looking at http://gambaswiki.org/wiki/lang/read?nh
> *Variable* *= READ* [ *#* *Stream* *,* ] *Length* ...
I believe you have misunderstood the use of Variable = READ [# Stream,]
If you want to get the last stream you have to write the code like this:
Public Sub Main()
Dim hFile As File
Dim sFile As String
hFile = Open "./my-demo.txt" For Read
Seek #hFile, -4
Read #hFile, sFile, 4
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User