type ETrigError = class(EMathError);function Tan(X: Extended): Extended;begin try Result := Sin(X) / Cos(X); except on EMathError do raise ETrigError.Create('Invalid argument to Tan'); end; end; //from delphi help
//oruses FileCtrl;procedure TForm1.Button1Click(Sender: TObject); begin if not DirectoryExists('c:\temp') then if not CreateDir('C:\temp') then raise Exception.Create('Cannot create c:\temp'); end;
eabort.create('')我不知道什么意思?
try
Result := Sin(X) / Cos(X);
except
on EMathError do
raise ETrigError.Create('Invalid argument to Tan');
end;
end;
//from delphi help
begin
if not DirectoryExists('c:\temp') then
if not CreateDir('C:\temp') then
raise Exception.Create('Cannot create c:\temp');
end;