| 1 |
unit confopt; |
| 2 |
{$IFDEF FPC} |
| 3 |
{$MODE DELPHI}{$H+} |
| 4 |
{$ENDIF} |
| 5 |
|
| 6 |
(***************************************) |
| 7 |
(* Copyright (C) 2003, SHIRAISHI Kazuo *) |
| 8 |
(***************************************) |
| 9 |
|
| 10 |
|
| 11 |
interface |
| 12 |
|
| 13 |
function ConfirmedDegrees:boolean; |
| 14 |
procedure ConfirmArithmetic; |
| 15 |
|
| 16 |
implementation |
| 17 |
uses SysUtils,Types, dialogs, StdCtrls, Controls, |
| 18 |
struct,base,base0,texthand,helpctex,mainfrm,sconsts; |
| 19 |
|
| 20 |
//var confirmed:boolean=false; |
| 21 |
|
| 22 |
function RadianConfirmed:boolean; |
| 23 |
var |
| 24 |
mes1:ansistring; |
| 25 |
begin |
| 26 |
mes1:=Format(s_ConfirmAngle,[programunit.name]); |
| 27 |
result:=FrameForm.AngleConfirmed |
| 28 |
or (Messagedlg(mes1,mtconfirmation,[mbYes,mbNo],IDH_OPTION_ANGLE)=mrYes); |
| 29 |
if result then |
| 30 |
FrameForm.AngleConfirmed:=true |
| 31 |
end; |
| 32 |
|
| 33 |
function ConfirmedDegrees:boolean; |
| 34 |
begin |
| 35 |
if not ProgramUnit.AngleDegrees |
| 36 |
and ((programunit.optionAngle=apNone) |
| 37 |
and (initialAngledegrees and not permitMicrosoft |
| 38 |
or (pass=1) and (mainprogram.AngleDegrees=true) and not RadianConfirmed)) then |
| 39 |
begin |
| 40 |
InsertLine(programunit.lineNumb+1,'OPTION ANGLE DEGREES'); |
| 41 |
programunit.AngleDegrees:=true |
| 42 |
end; |
| 43 |
result:=ProgramUnit.angleDegrees; |
| 44 |
end; |
| 45 |
|
| 46 |
procedure ConfirmArithmetic; |
| 47 |
var |
| 48 |
mes1:ansistring; |
| 49 |
s:ansistring; |
| 50 |
function ArithConfirmed:boolean; |
| 51 |
begin |
| 52 |
mes1:=Format(s_ConfirmArithmetic,[programunit.name |
| 53 |
,PrecisionLiteral[programunit.arithmetic] |
| 54 |
,s]); |
| 55 |
result:=FrameForm.ArithmeticConfirmed |
| 56 |
or (Messagedlg(mes1,mtconfirmation,[mbYes,mbNo],IDH_OPTION_ARITHMETIC)=mrYes); |
| 57 |
if result then |
| 58 |
FrameForm.ArithmeticConfirmed:=true |
| 59 |
end; |
| 60 |
begin |
| 61 |
s:='OPTION ARITHMETIC ' + PrecisionLiteral[MainProgram.arithmetic]; |
| 62 |
if (MainProgram.arithmetic<>programunit.arithmetic) |
| 63 |
and (programunit.optionArithmet=apNone) and not permitMicrosoft |
| 64 |
and not ArithConfirmed then |
| 65 |
begin |
| 66 |
InsertLine(programunit.lineNumb+1,s); |
| 67 |
programunit.arithmetic:=MainProgram.arithmetic |
| 68 |
end; |
| 69 |
end; |
| 70 |
|
| 71 |
end. |
| 72 |
|