Boolean Operators perform various operations on the terms specified. There are several different types of operation available.

Symbol | Type | Name | Description | Example |
---|---|---|---|---|

Bitwise |
||||

?& | Infix | AND | True if left and right terms are true | ` a ?& b ` |

?| | Infix | OR | True if left or right terms are true | ` a ?| b ` |

?^ | Infix | XOR | True if left or right terms, but not both, are true | ` a ?^ b ` |

?^ | Prefix | NOT | Inverts the value of the term | ` ?^ a ` |

Type Casting |
||||

? | Prefix | Cast | Converts the term to a Boolean | ` ?a ` |

! | Prefix | Inverse cast | Converts the term to a Boolean, and inverts the value | ` !a ` |

Type Checking |
||||

is | Infix | IsType | Checks if the value of the left term is of the type specified by the right term | `a is boolean` |

Each Operator will evaluate the terms provided as appropriate to the Operator value type - for instance, performing a boolean bitwise OR on two Numbers will convert the Numbers to Booleans first.