0

我正在做一个项目,我在本地访问数据(通过 Dropbox)。我无法找到从数据文件中获取数字的方法。我可以拿整个数据文件,比较小,但我想整理一下,只收集十进制值,我不关心文本。找到有用的功能以及它们如何工作一直是一个挑战。好奇这里是否有人有任何方法可以为我指明正确的方向。寻找可以帮助我的特定功能。如果没有,无论如何,谢谢。

    getnumberstest2() updating;

    vars
file    :   File;
source  :   String;
line    :   String;
test2   :   String;
test3   :   Array;
cust    :   Customer;
i       :   Integer;
pizza   :   DecimalArray;
    begin
create file transient;
file.fileName   :=  "C:\Users\Chris\Dropbox\Capstone\ChrisQ\SAgent1.txt";
file.kind       :=  File.Kind_Unknown_Text;
file.mode       :=  File.Mode_Input;
file.open;
i               := 1;
beginTransaction;
    while not file.endOfFile do
        line    := file.readLine;
        test2   := line[1:end];
        create cust;
        cust.source := test2[i];
        write test2[i];
        write test2;
        test3   := test2[1];   //This is the incompatible types error
    endwhile;
commitTransaction;
    epilog
delete file;
    end;
4

0 回答 0