Boolean values: Difference between revisions
Content deleted Content added
→{{header|PARI/GP}}: expand |
Added Idris Solution |
||
Line 568: | Line 568: | ||
== {{header|Icon}} and {{header|Unicon}}== |
== {{header|Icon}} and {{header|Unicon}}== |
||
Icon and Unicon do not use Boolean values for flow control. Rather they use success (returning a result, any result even a null) or failure (a signal) for this purpose. Built-in controls support not, and (&), and or (|). For an example of how this works, see [[Short-circuit_evaluation#Icon_and_Unicon|Short Circuit Evaluation]]. Icon and Unicon do support bit operations on integers which could be used to record Boolean state. See also [[Logical_operations#Icon_and_Unicon|Logical Operations]] for an example of how and when Boolean values might be implemented. |
Icon and Unicon do not use Boolean values for flow control. Rather they use success (returning a result, any result even a null) or failure (a signal) for this purpose. Built-in controls support not, and (&), and or (|). For an example of how this works, see [[Short-circuit_evaluation#Icon_and_Unicon|Short Circuit Evaluation]]. Icon and Unicon do support bit operations on integers which could be used to record Boolean state. See also [[Logical_operations#Icon_and_Unicon|Logical Operations]] for an example of how and when Boolean values might be implemented. |
||
=={{header|Idris}}== |
|||
<lang idris>Idris> :doc Bool |
|||
Data type Prelude.Bool.Bool : Type |
|||
Boolean Data Type |
|||
Constructors: |
|||
False : Bool |
|||
True : Bool |
|||
</lang> |
|||
=={{header|Inform 6}}== |
=={{header|Inform 6}}== |