3.2. Logical Types

In Gamma, there are two objects of logical type: t and nil. t is a logically true value, and nil is the ONLY logically false value in Gamma. All other objects are considered to be logically true, including the number zero. This is different from the C language where the number zero is treated as logically false.

The operators !, &&, and || can be used with t and nil.

Example:

    Gamma> !nil;
    t
    Gamma> !t;
    nil
    Gamma> !0;
    nil
    Gamma> 2 || nil;
    2
    Gamma> 2 && nil;
    nil
    			

Copyright 1995-2002 by Cogent Real-Time Systems, Inc.