Logiweb(TM)

7.2.3 If-then-else

Prev Up Next Page 172 of 800 Search internet


The most important operation on Booleans is the selection construct:

if x then y else z [if x then y else z]

The selection construct has the following properties:

if true then y else z == y

if false then y else z == y

When the first argument of the selection construct is no Boolean, the selection construct equals an exception or bottom. Two examples read:

if 2 then y else z == exception

if bottom then y else z == bottom

Prev Up Next Page 172 of 800 Search logiweb.eu

Copyright © 2010 Klaus Grue, GRD-2010-01-05