/p>
Лістинг модуля з основним алгоритмом на загальносистемному мові програмування
unit Unit1;
interface
uses, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,, ExtCtrls, StdCtrls, Spin, Math, ComCtrls, Gauges;
MyThread = class (TThread)
{Private declarations} Execute; override; PlusGauge1; MinusGauge1; PlusGauge2; MinusGauge2; UpdateLabels;;
TForm1 = class (TForm): TGroupBox;: TLabel;: TLabel;: TLabel;: TSpinEdit;: TSpinEdit;: TSpinEdit;: TSpinEdit;: TSpinEdit;: TSpinEdit;: TSpinEdit;: TSpinEdit; : TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TSpinEdit;: TSpinEdit ;: TSpinEdit;: TSpinEdit;: TSpinEdit;: TSpinEdit;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TSpinEdit;: TLabel;: TLabel;: TLabel;: TButton;: TButton;: TGroupBox;: TGauge;: TGauge;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel;: TLabel; : TLabel;: TLabel;: TLabel; FormCreate (Sender: TObject); Button1Click (Sender: TObject); Button2Click (Sender: TObject);
{Private declarations}: MyThread;
{Public declarations};
var: TForm1;
{$ R *. dfm}, VolumeA, VolumeB, LostTransacts, AB1, AB2, BC1, BC2, RBC1, RBC2, reserve, through_AB1_AB2: integer; _uses, AB2_uses, BC1_uses, BC2_uses, RBC1_uses, RBC2_uses, exit: boolean;
// +-PlusMinus (osnova, dopoln: integer): integer;, pp: integer; pp: = random (2); pp of
: itog: = osnova + random (dopoln +1);
: itog: = osnova - random (dopoln +1);;: = itog;;
procedure MyThread.PlusGauge1;: = tpNormal;. Gauge1.Progress: = Form1.Gauge1.Progress +1;;
MyThread.MinusGauge1;. Gauge1.Progress: = Form1.Gauge1.Progress-1;: = tpLower;;
MyThread.PlusGauge2;. Gauge2.Progress: = Form1.Gauge2.Progress +1;;
MyThread.MinusGauge2;. Gauge2.Progress: = Form1.Gauge2.Progress-1;;
MyThread.Execute; _way: integer;: = true; VolumeA
: beginBC1_uses do begin end; _uses: = True; (BC1); (VolumeB); _uses: = False;;
: beginBC2_uses do begin of
: beginRBC1_uses do begin end; _uses: = True; (RBC1); _uses: = False; (reserve);;
: beginRBC2_uses do begin end; _...