Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
11
Task/System-time/Pascal/system-time-1.pas
Normal file
11
Task/System-time/Pascal/system-time-1.pas
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
type
|
||||
timeStamp = packed record
|
||||
dateValid: Boolean;
|
||||
year: integer;
|
||||
month: 1..12;
|
||||
day: 1..31;
|
||||
timeValid: Boolean;
|
||||
hour: 0..23;
|
||||
minute: 0..59;
|
||||
second: 0..59;
|
||||
end;
|
||||
16
Task/System-time/Pascal/system-time-2.pas
Normal file
16
Task/System-time/Pascal/system-time-2.pas
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
program systemTime(output);
|
||||
var
|
||||
ts: timeStamp;
|
||||
begin
|
||||
getTimeStamp(ts);
|
||||
|
||||
{
|
||||
If `getTimeStamp` is unable to obtain the time, it will
|
||||
set `timeValid` to `false` and `hour`, `minute` and
|
||||
`second` are set to a time representing midnight (0:00:00).
|
||||
}
|
||||
if ts.timeValid then
|
||||
begin
|
||||
writeLn(time(ts));
|
||||
end;
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue