Code: Select all
PROCEDURE Date*;
(* ... *)
BEGIN
(* ... *)
IF S.class = Texts.Int THEN (*set clock*)
(* ... *)
IF (day >= 1) & (day <= 31) & (mo >= 1) & (mo <= 12) & (yr >= 0) & (yr <= 63) THEN
dt := ((((yr*16 + mo)*32 + day)*32 + hr)*64 + min)*64 + sec;
Kernel.SetClock(dt)
END
ELSE (*read clock*)
dt := Oberon.Clock()
END;
Texts.WriteClock(W, dt); EndLine
END Date;
I have fixed this thusly OMM:
Code: Select all
PROCEDURE Date*;
(* ... *)
BEGIN
(* ... *)
IF S.class = Texts.Int THEN (*set clock*)
(* ... *)
IF (day >= 1) & (day <= 31) & (mo >= 1) & (mo <= 12) & (yr >= 0) & (yr <= 63) THEN
dt := ((((yr*16 + mo)*32 + day)*32 + hr)*64 + min)*64 + sec;
Kernel.SetClock(dt)
END
END;
dt := Oberon.Clock();
Texts.WriteClock(W, dt); EndLine
END Date;