[delphi]stoper

0

Jak zrobić prosty stoper nie wykorzystując timera????????

hmm... hmm...

0

Wymyslilem cos takiego (aplikacja konsolowa), stoper od 0 do 20 sekund;

program stop;
{$APPTYPE CONSOLE}
uses
SysUtils;

procedure Stoperek;
var
BiezSekunda:integer;
NastSekunda:integer;
Stoper:integer;
begin
Stoper:=0;
repeat
NastSekunda:=BiezSekunda+1;
BiezSekunda:=StrToInt(Copy(TimeToStr(Time),7,2));

    if BiezSekunda=NastSekunda then
            begin
            Stoper:=Stoper+1;
            end;

    Writeln(IntToStr(Stoper));

until Stoper=20;

end;

begin
Stoperek;
end.

O to chodzilo?

{hello}

0

&gt Writeln(IntToStr(Stoper));

InToStr niepotrzebne, rzecz jasna :[[

Writeln(Stoper);

0

Można pokombinować z opcją SLEEP

0

Dzięki!!!!!!! {browar}

1 użytkowników online, w tym zalogowanych: 0, gości: 1