summaryrefslogtreecommitdiff
path: root/fpcdocs/datutex/ex6.pp
blob: fc2e882f91260b8843aba0e740e94c53c4b58ff2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Program Example6;

{ This program demonstrates the IsValidTime function }

Uses SysUtils,DateUtils;

Var
  H,M,S,MS : Word;
  I : Integer;

Begin
  For I:=1 to 10 do
    begin
    H:=Random(48);
    M:=Random(120);
    S:=Random(120);
    MS:=Random(2000);
    If Not IsValidTime(H,M,S,MS) then
      Writeln(H,':',M,':',S,'.',MS,' is not a valid time.');
    end;
End.