我正在测试 Delphi 2010,我犯了以下错误:
我是否输入了这个字符链“096 - Construção Ltda”,我是否只将她/它移动到另一个变量并看看他/它留下了什么“096 - Construção Ltda”,有人知道如何找出吗?
入口基地
001 Alcides João Pereira
002 Alvir Maçaneiro
003 Auto Elétrica Imamura Ltda
004 Auto Peças Araújo
005 Auto Peças Porto Eixo Ltda
006 Auto Peças União
007 Azambuja Industria Comercio de Materiais de Construção Ltda
008 Balaroti Comercio De Materiais De Construção Ltda
Transport 009 Ltd
010 Battistella Veículos Pesados Ltda
011 Berton Diesel Auto Peças
012 Bisolo Materiais de Construção Ltda
procedure TForm1.Button2Click(Sender: TObject);
var
tfEntrada : TextFile;
intI, intJ : Integer;
strA, strS : String;
procedure lerUm; //To read a registration of the file text
begin
inc( intI );
ReadLn( tfEntrada, strS );
strA := Copy( IntToStr( intI + 1000 ), 2, 3 ) + ' - ';
Edit1.Text := strS;
end;
begin
intI := 0;
AssignFile( tfEntrada, 'nomes_tst_0001.txt' );
Reset( tfEntrada );
lerUm;
while not Eof ( tfEntrada ) do
begin
mmEntrada.Lines.Add( strA + strS ); //I move for TMemo(mmEntrada, mmSaida), in the form
mmSaida.Lines.Add( strA + strS );
lerUm;
end;
CloseFile( tfEntrada );
end;
结果库
001 - Alcides João Pereira
002 - Alvir Maçaneiro
003 - Auto Elétrica Imamura Ltda
004 - Auto Peças Araújo
005 - Auto Peças Porto Eixo Ltda
006 - Auto Peças União
007 - Azambuja Industria Comercio de Materiais de Construção Ltda
008 - Balaroti Comercio De Materiais De Construção Ltda
009 - Baldissera LogÃstica e Transportes Ltda Me
010 - Battistella VeÃculos Pesados Ltda
011 - Berton Diesel Auto Peças 012 - Bisolo Materiais de建设有限公司