It is 98% working, now just little bits of problems that is causing me to desperate.
First:
In QB I was using
Code: Select all
Open "filename" for Random as #1 len=1
Field #1, 1 as A$
Get #1
or Get #1,,A$
In FB, with #Lang qb
Open "filename" for Random as #1 len=1
Get #1,,A$
FB doesn't deal with [Field], so I can't define correctly what or how many bytes will be read in each "Get".
Even the "len=1" in the opening statement, [Get #1,,A$] will read as many bytes into A$ as it seems fit.
I don't know exactly what logic it uses, but it seems that if it only stops to "get" bytes from the file into A$, when the byte is not alpha-numeric, I mean, ASCII lower than "!" and higher than "z", or something like that.
It is impossible to make it work correctly.
So, well, it seems the GET just pull bytes according to the variable definition.
If I use
Code: Select all
Dim A as Integer
Open "filename" for random as #1 len=1
Get #1,,A
Dim A as Short will pull 2 bytes
Well, [Dim A as Byte] should work, but it can't be used in #lang qb.
The literature say to use _byte instead.
I can't figure out how to use the _byte
Dim A as _byte ???
Compilation error: Expected End-of-Line, found '_BYTE'
Any help please?
Cheers,