I am taking VB6 code and translating it to Delphi.
VB6 code that opens a file using sequential order:
Dim bytNumDataPoints As Byte
Dim bytcount as Byte
Dim lintData(0 To 23) As Long
Input #intFileNumber, bytNumDataPoints
For bytcount = 0 To (bytNumDataPoints - 1)
Input #intFileNumber, lintData(bytcount) '
lintData(bytcount) = (lintData(bytcount) + 65536) Mod 65536
Next bytcount
File data:
24 <<<<<<<<<<<< Number Data Points
200 300 400 450 500 600 750 1000 1250 1500 1750 2000 2500 3000 3500 3750 4000 4500 5000 5250 5500 5750 6000 6250 <<<< data
This is some neat stuff. You keep calling Input and fill out the array. As far I know there is no equivalent for this phenomena in Delphi. You cannot use ReadLn like that, right? To me in Delphi you would have to
ReadLn(F, S); //S is a string
z.Delimiter := ' '; //z is a stringlist
z.DelimitedText := S; //and then breakdown the array
Any thought? Thanks.