?? unit1.pas
字號:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
//PROGRAM D4R11
//Driver for routine ERFC
uses
unit2;
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var
ACTUAL:array[1..5] of REAL;X:array[1..5] of real;
F:TextFile; j:Integer;
const
s1='%14.7f'; s2='%6.2f';
begin
ACTUAL[1]:= 0.7772974; ACTUAL[2]:= 0.257899;
ACTUAL[3]:= 0.1572992; ACTUAL[4]:= 0.089686;
ACTUAL[5]:= 0.0109095;
X[1]:= 0.2; X[2]:= 0.8;
X[3]:= 1; X[4]:= 1.2;
X[5]:= 1.8;
//輸出計算結果到文件
AssignFile(F, 'd:\delphi_shu\p4\d4r11.dat');
Rewrite(F);
Writeln(F, ' X Actual ERFC(X)');
For j:= 1 To 5 do
Writeln(F,Format(s2,[X[j]]),Format(s1,[Actual[j]]),
Format(s1,[ERFC(X[j])]));
CloseFile(F);
//屏幕顯示計算結果
memo1.Lines.LoadFromFile('d:\delphi_shu\p4\d4r11.dat');
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -