|
MODULE PrintDate; IMPORT Clocks, Dates, Print, Times; VAR now: Times.Time; PROCEDURE PrintTime(time: Times.Time); VAR date: Dates.LongInfoRec; BEGIN Dates.GetLong(time, date); Print.F7("%02d.%02d.%02d %02d:%02d:%02d %s\n", date.day, date.month, date.year, date.hour, date.minute, date.second, date.tzInfo.name); END PrintTime; BEGIN Clocks.GetTime(Clocks.system, now); PrintTime(now); END PrintDate. |
Times.Time ist ein abstrakter Datentyp, der
mit beliebigen Repräsentierungen der Zeit (sowohl absolut
als auch relativ) arbeiten kann.
| |
Clocks ist eine Abstraktion für beliebige Uhren;
Clocks.system ist die lokale Systemuhr.
|
Copyright © 1999, 2004, 2005 Andreas Borchert, in HTML konvertiert am 14.09.2005 |