10
TMsgDlgBtn = (mbYes, mbNo, mbOK, mbCancel, mbAbort, mbRetry, mbIgnore, mbAll, mbNoToAll, mbYesToAll, mbHelp);
11
TMsgDlgButtons = set of TMsgDlgBtn;
12
TMsgDlgType = (mtWarning, mtError, mtInformation, mtConfirmation, mtCustom);
14
procedure Msg (lStr: string);
15
procedure ShowMsg (lStr: string);
16
procedure msgfx (a,b,c,d: double); overload; //fx used to help debugging - reports number values
17
function MsgDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Word;
18
function GetInt(lStr: string; lMin,lDefault,lMax: integer): integer;
19
procedure MyReadLn;//no GUI: waits for user
20
function GetStr(lPrompt: string): string;
21
//procedure vx (a,b,c,d: double);
25
mrAbort = 1;// idAbort
28
{$IFDEF GUI}uses readint,dialogs,gui; {$ENDIF}
30
procedure vx (a,b,c,d: double); //vx used to help debugging - reports number values
32
msg(floattostr(a)+':'+floattostr(b)+':'+floattostr(c)+':'+floattostr(d));
50
function MsgDlg(const Msg: string; DlgType: TMsgDlgType; Buttons: TMsgDlgButtons; HelpCtx: Longint): Word;
53
lDlgType : Dialogs.TMsgDlgType;
54
lButtons: Dialogs.TMsgDlgButtons;
57
lDlgType := Dialogs.TMsgDlgType(DlgType);
58
lButtons:= Dialogs.TMsgDlgButtons(Buttons);
59
result := MessageDlg(Msg, lDlgType, lButtons,HelpCtx);
63
writeln('WARNING: dialogs not being used. Unabled to process this '+Msg);
67
procedure ShowMsg (lStr: string);
75
procedure msgfx (a,b,c,d: double); overload; //fx used to help debugging - reports number values
78
msg(floattostr(a)+'x'+floattostr(b)+'x'+floattostr(c)+'x'+floattostr(d));
80
msg(floattostr(a)+'x'+floattostr(b)+'x'+floattostr(c)+'x'+floattostr(d));
84
procedure Msg (lStr: string);
87
MainForm.Memo1.Lines.Add(lStr);
94
function GetStr(lPrompt: string): string;
99
lOK := InputQuery(lPrompt, lPrompt, result);
113
function GetInt(lStr: string; lMin,lDefault,lMax: integer): integer;
116
//result := GetInt(lStr, lMin,lDefault,lMax);
118
Showmessage('Warning - unable to get values for '+lStr);
125
writeln ( lStr+' ['+inttostr(lMin)+'..'+inttostr(lMax)+'], default '+inttostr(lDefault));
131
writeln(inttostr(lDefault));
134
if result < lMin then
136
if result > lMax then