我正在使用 VB6 代码并将其转换为 Delphi。
使用顺序打开文件的 VB6 代码:
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
档案资料:
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
这是一些整洁的东西。您继续调用 Input 并填写数组。据我所知,在 Delphi 中这种现象没有等价物。你不能像那样使用 ReadLn,对吧?在德尔福对我来说,你必须
ReadLn(F, S); //S is a string
z.Delimiter := ' '; //z is a stringlist
z.DelimitedText := S; //and then breakdown the array
任何想法?谢谢。