Previous section: Assignment

Dylan reference manual -- True and False

4. Control Constructs

True and False

In Dylan, there is a single object that counts as false. This object is indicated by the syntax #f[10]. All other values are considered true for the sake of true/false testing. The canonical true object, indicated by the syntax #t, can be used for clarity of code.

Throughout the manual, the phrases "true," "false," "returns true," and "returns false" are used. It's important to remember that "returns true" does not necessarily mean "returns the object #t." It simply means "returns any object besides #f." Sometimes for efficiency, debuggability, or informational value, some value besides #t is returned.

#t		[Object]
This is the canonical true value. In Dylan, all objects besides #f count as true, not just #t.
#f		[Object]
This is the only false value.
~  thing   =>  boolean	[Function]
Returns true if thing is #f; otherwise returns false.

Next section: Conditionals