Home > Back-end >  Help circulation batch execution grammar (step OK, batch execution for statement skip)
Help circulation batch execution grammar (step OK, batch execution for statement skip)

Time:09-16



As shown in the above, after tests found why the program cannot be executed in the process of batch test for statement???????
Procedure TForm1. OutputTxtFile (AFileName: string; AGraphRec: TGraphRec; Number1: integer);//call to StringGrid display method
Var
H, s, j: integer;
ExcelApp: OleVariant;
The count, num, I: integer;
Number2: string;
The begin
Try
ExcelApp:=CreateOLEObject (' Excel. Application);
Except,
Application. MessageBox (' Excel is not installed! ', 'prompt', MB_OK + MB_ICONASTERISK + MB_DEFBUTTON1 + MB_APPLMODAL);
The Exit;
end;
With AGraphRec do
The begin
Try
StringGrid1. Cells [0, Number1] :=TrayID;
For I:=0 to length (AGraphRec GraphData) - 1 the do loop//batch no call??
The begin
If (the Format (' %. 1 f, [AGraphRec. GraphData [I]. Current [0]]) & gt; '3900')
Then
StringGrid1. Cells [Number1, Number1] : the format of=(. % 1 f, [AGraphRec. GraphData [I] Temperature [0]/20]);
StringGrid1. Cells [Number1, Number1] :=inttostr (I);
end;


Procedure TForm1. Button2Click (Sender: TObject);//button method
Var
Gd: TGraphData;
I: integer;
Path: the string;
BValue: TGraphRec;
The begin
For I:=0 to self. Memo1. Lines. Do the Count - 1
The begin
GetGraphRec (Memo1 Lines [I], BValue);
OutputTxtFile (strutils AnsiReplaceStr (lowercase (Memo1 Lines [I]), 'dat', 'like'), BValue, I + 1);
//Memo2. Lines. The Add (strutils AnsiReplaceStr (lowercase (Memo1. Lines [I]), 'dat', '. XLS '));
end;
  • Related