aram = '0 ') then (true) ; elseFunc in ['n', 'p'] then: = Func;;;; (False); CurrentFunc = # 0 then: = Func;; Calculated then: = Operation;; Calculated then: = Result;; (true ); (FParam); (false);: = false;: ='';: =''; else (Length (SParam)> 0) and (SParam <> '0 ') then (FParam); ( SParam);: = Operation;;;;; GetResult; not Calculated thenCurrentFunc <> # 0 then: = Operation;;.
Модуль Groutput
unit GrOutPut;
{$ N +} Graph; = string [64]; = Procedure; = record: char;: StrParam;; = record, y1, x2, y2: word;;
{Output controls} = 30; = 20; = 600; = 60;
{***************}
{All ordinal operations} = ['+', '-', '*', '/', 'c', 's', 't', 'k', '?' , 'x'];
{**********************} = [0 ". '9 ','. ']; p align="justify"> {***************************************** } = [2,3,4,9,10,11,16,17,18,23,30.35]; = [30.35];
{***********************************} = 13; = 36 ; CheckOutPut (var Out: StrParam); ClearOutPut; ClrResOut; SetFActive (param: boolean); TextToOut (Out: StrParam); AddToOutPut (Param: StrParam;: TMem;: set of char;: set of byte;: char;, Operation, i, j, Middle, Key: word;, SActive, Calculated: boolean; CheckOutPut (var Out: StrParam);: boolean;: = 1;: = false; Pos ('-', Out) <> 0 then (Out, 1,1);: = true;; Pos ('', Out) <> 0 do delete (Out , Pos ('', Out), 1); i <= Length (Out) doOut [i] = '.' theni <> Pos ('.', Out) then (Out, i, 1);: = i-1;; (i);; Out [2] <> '.' then (Out [1] = '0 ') or (Out [1] ='. ') doLength (Out)> 1 then Delete (Out, 1,1) else; Out [1] = '.' then Out: = '0 '+ Out; Out [Length (Out)] ='. 'then Out: = Out + '0'; Length (Out) = 0 then Out: = '0 '; MinesState thenPos (' - ', Out) = 0 then: =' - '+ Out;; SetFActive (param: boolean);: = Param;: = not Param; ; BackSpaceSymbol;: = false; FActive of: FParam <> '0 'then (FParam, Length (FParam), 1); (FParam);;: SParam <> '0' then (SParam, Length (Out: StrParam); FActive of: SetViewPort (OutXs +1, OutYs +3, OutXf-1, OutYs + FParamOfs-1, true);: SetViewPort (OutXs +1, OutYs + FParamOfs, OutXf-1, OutYf-3 , true);;; (Out);; FActive of: begin OutTextXY (OutXf-40-TextWidth (Out) div 2,4, Out); ClrResOut; end;: OutTextXY (OutXf-40-TextWidth (Out) div (Result), 2, OutXf-40, 2); (OutXf-40-TextWidth (Result) div 2,9, Result);: = true; (0,0, GetMaxX, GetMaxY, true);; CEClick;: = 0;;: = false; FActive of: begin FParam: = '0 '; TextToOut ('0'); (false); TextToOut (SParam); (true); end;: begin SParam: = '0 '; TextToOut ('0 '); (true); TextToOut (FParam); (false); end;; ('...