next up previous contents index
Next: Collections of Data Up: Numeric Abstractions Previous: Multiplying two numbers: mult   Contents   Start

Application of numeric abstractions

(bdisp! (zerop zero))
                             --> true
(bdisp! (zerop one))
                             --> false
(ndisp! (add two three))
                             --> 5
(ndisp! (succ one))
                             --> 2
(ndisp! (mult two three))
                             --> 6

The abstraction `ndisp!' is another one of those primitive functions that are introduced later on as required extensions of A++ to interface with the computer, in this case to display numbers on the screen.

Georg P. Loczewski 2004-03-05

Impressum und Datenschutz