source11 XOOCSN74W6VQ4HOEV6KLMPMJXM5HGFIOQWJMRXQ







Source11


type
TPrimeThrd = class(TThread)
private
FTestNumber: integer;
FResultString: string;
protected
function IsPrime: boolean;
procedure Execute; override;
public
property TestNumber: integer write FTestNumber;
property ResultString: string read FResultString;
end;

procedure TPrimeThrd.Execute;
begin
if IsPrime then
FResultString := IntToStr(FTestNumber) + ' is prime.'
else
FResultString := IntToStr(FTestNumber) + ' is not prime.';
if not Terminated then {Line B}
PostMessage(PrimeFrm.Handle, WM_THREAD_COMPLETE, 0, 0);
end;

procedure TPrimeFrm.HandleThreadCompletion(var Message: TMessage);
begin
if Assigned(FThread) then
begin
FThread.WaitFor;
ResultsMemo.Lines.Add(FThread.ResultString);
FThread.Free;
FThread := nil;
end;
end;





Wyszukiwarka

Podobne podstrony:
source30
Matrix3?pp source
Thread?pp source
arm biquad ?scade ?1 ?st q31? source
arm conv ?2? source
arm mat mult q15? source
Resource 8inl source
arm fir lattice init q31? source
arm fir ?cimate ?st q15? source
arm correlate ?st q15? source
connector?s source
source8
register? source
passing values source
arm iir lattice init ?2? source
arm mult q31? source
2004 11 Porównanie serwerów relacyjnych baz danych Open Source [Bazy Danych]

więcej podobnych podstron