Jak zrobić prosty stoper nie wykorzystując timera????????
hmm... hmm...
Jak zrobić prosty stoper nie wykorzystując timera????????
hmm... hmm...
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}
> Writeln(IntToStr(Stoper));
InToStr niepotrzebne, rzecz jasna :[[
Writeln(Stoper);
Można pokombinować z opcją SLEEP
Dzięki!!!!!!! {browar}