Figure 31.
Erroneous Split procedure.
----------------------------------------------------------
with STANDARD_INTEGERS; use STANDARD_INTEGERS;
procedure Split(TIME Integer_32;
HOURS : out Integer_32;
MIN : out Integer_32;
SEC : out float) is
begin
HOURS := TIME / 3600_000;
TIME := TIME mod 3600_000; -- line 10
MIN := TIME / 60_000;
TIME := TIME mod 60_000; -- line 12
SEC := float(TIME) / 1000.0;
end Split;
Meridian AdaVantage(tm) Compiler
[v2.1 Feb 29, 1988] Target 8086
"split.ada", 10: assignment to read-only object [LRM 6.2/5]
"split.ada", 12: assignment to read-only object [LRM 6.2/5]
15 lines compiled.
2 errors detected.