Boolean

From Erights

(Difference between revisions)
Jump to: navigation, search
(category)
(use instance msgdoc template)
Line 3: Line 3:
== Protocol ==
== Protocol ==
-
=== pick/2 ===
+
{{instance msgdoc|pick|2|<var>t</var>, <var>f</var>|any}}
-
 
+
-
pick(<var>t</var>, <var>f</var>) :any
+
false.pick(<var>t</var>, <var>f</var>) returns <var>f</var>; true.pick(<var>t</var>, <var>f</var>) returns <var>t</var>.
false.pick(<var>t</var>, <var>f</var>) returns <var>f</var>; true.pick(<var>t</var>, <var>f</var>) returns <var>t</var>.
-
=== not/0 ===
+
{{instance msgdoc|not|0||[[Boolean]]}}
-
 
+
-
not() :Boolean
+
Boolean negation.
Boolean negation.
-
=== or/1 ===
+
{{instance msgdoc|or|1|<var>other</var> :[[Boolean]]|[[Boolean]]}}
-
 
+
-
or(<var>other</var> :Boolean) :Boolean
+
Boolean or. The argument is coerced to a boolean.
Boolean or. The argument is coerced to a boolean.
-
=== and/1 ===
+
{{instance msgdoc|and|1|<var>other</var> :[[Boolean]]|[[Boolean]]}}
-
 
+
-
and(<var>other</var> :Boolean) :Boolean
+
Boolean and. The argument is coerced to a boolean.
Boolean and. The argument is coerced to a boolean.
-
=== xor/1 ===
+
{{instance msgdoc|xor|1|<var>other</var> :[[Boolean]]|[[Boolean]]}}
-
 
+
-
xor(<var>other</var> :Boolean) :Boolean
+
Boolean exclusive or. The argument is coerced to a boolean.
Boolean exclusive or. The argument is coerced to a boolean.
=== op__cmp/1 ===
=== op__cmp/1 ===
-
 
Comparison with other Booleans. See [[Message op__cmp]].
Comparison with other Booleans. See [[Message op__cmp]].
[[Category:ELib specification]]
[[Category:ELib specification]]

Revision as of 02:50, 2 July 2008

The Boolean type has exactly two members, false and true. All three names are in the universal scope.

Contents

Protocol

pick/2

Signature: pick(t, f) :any

false.pick(t, f) returns f; true.pick(t, f) returns t.

not/0

Signature: not() :Boolean

Boolean negation.

or/1

Signature: or(other :Boolean) :Boolean

Boolean or. The argument is coerced to a boolean.

and/1

Signature: and(other :Boolean) :Boolean

Boolean and. The argument is coerced to a boolean.

xor/1

Signature: xor(other :Boolean) :Boolean

Boolean exclusive or. The argument is coerced to a boolean.

op__cmp/1

Comparison with other Booleans. See Message op__cmp.

Personal tools
more tools