> < ^ Date: Tue, 21 Dec 1999 15:14:14 +0000
> < ^ From: Steve Linton <sal@dcs.st-and.ac.uk >
^ Subject: Booleans

Dear GAP Forum,

Sergei Haller pointed out the following strange message:

sergei.haller@math.uni-giessen.de said:
> gap> if fail then Print("1\n"); else Print("2\n"); fi; 
> <expr> must be 'true' or 'false' (not a boolean)           # very funny :) 
> gap> 

As he correctly observes, this is not really a bug. `fail' is regarded as a
Boolean in GAP 4, but only certain Booleans (both the other ones, in fact) are
allowed in this situation.

The message arises in the kernel, and this and similar messages can arise in a
number of places. I will try and clarify these messages for the next release of
GAP. In the meantime, please understand the intent (that the expression in `if
<expr> then' must evaluate to `true' or `false') and forgive us the slightly
unfortunate wording.

Steve Linton

> < [top]