Assertions: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 119:
(assert (and (integerp x) (= 42 x))))</lang>
=={{header|Component Pascal}}==
<lang oberon2>
MODULE Assertions;
VAR
x: INTEGER;
PROCEDURE DoIt*;
BEGIN
x := 41;
ASSERT(x = 42);
END DoIt;
END Assertions.
Assertions.DoIt
</lang>
Output:
<pre>
TRAP 0
Assertions.DoIt [0000001DH]
Kernel.Call [00001A7CH]
.adr INTEGER 1685454913
.kind INTEGER 0
.n INTEGER 0
.p INTEGER 0
.par ARRAY 256 OF INTEGER elements
.r REAL 8.70603013185328E+175
.sig POINTER [64760018H]
.size INTEGER 2287288
.sp INTEGER 256
.typ POINTER NIL
Meta.Item.ParamCallVal [00002B5EH]
.adr INTEGER 1685454913
.data ARRAY 256 OF INTEGER elements
</pre>
=={{header|D}}==
|