Logic! datatype

1. Abstract

The logic! datatype represents the boolean values true and false.

Logic! is a member of the following typesets: immediate!

2. Creation

Logic! values can be created using literal syntax, or at runtime using a make constructor, or a to conversion.

to logic! converts to true for any value except for false and none.

>> to logic! 'hi
== true

>> to logic! 123
== true

>> to logic! none
== false

>> to logic! false
== false

3. Literal syntax

The predefined words true and false, or the serialized syntax:



4. Testing values

Use logic? to check if a value is of the logic! datatype.

>> logic? on
== true

Use type? to return the datatype of a given value.

>> type? false
== logic!

5. Predefined words

true, yes, on

false, no, off

5.1. Functions


results matching ""

    No results matching ""