> For the complete documentation index, see [llms.txt](https://docs.videc.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.videc.de/acron-9.3/en/intro/operator/operator_logisch.md).

# Logical Operators

You use the logical [operators](/acron-9.3/en/intro/operator.md) to formulate logical expressions (logic operations). The result ([return value](/acron-9.3/en/intro/funktionen/rueckgabewert.md)) of a logical operation always has the data type [BOOL](/acron-9.3/en/intro/datentypen.md).

The Formula Editor provides the following logical operators:

| Operator     | Meaning                              | Data types |
| ------------ | ------------------------------------ | ---------- |
| !            | [Negation](#negation)                | BOOL       |
| AND or .AND. | [Logical AND](#logical_and)          | BOOL       |
| OR or .OR.   | [Logical OR](#logical_or)            | BOOL       |
| XOR or .XOR. | [Logical exclusive OR](#logical_xor) | BOOL       |

Note that logical operators, too, are subject to a processing sequence. This processing sequence is similar to the sequence for arithmetic operators. Here, too, the rule "dot before dash calculations" applies.

An expression is evaluated in the sequence NEGATION, then logical AND and lastly logical OR/exclusive OR.

If you want to bypass this order you must use brackets. The levels of brackets are then evaluated from inside to outside.

## Negation (!) <a href="#negation" id="negation"></a>

|               |                                                                                                                                                     |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:       | ! Operand                                                                                                                                           |
| Data types:   | BOOL                                                                                                                                                |
| Return value: | BOOL                                                                                                                                                |
| Description:  | Returns the logical negation of the operand. The result is TRUE if the operand has the value FALSE, and is FALSE if the operand has the value TRUE. |

## Logical AND (AND or .AND.) <a href="#logical_and" id="logical_and"></a>

|               |                                                                                                                                                                             |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:       | Operand AND Operand                                                                                                                                                         |
| Data types:   | BOOL                                                                                                                                                                        |
| Return value: | BOOL                                                                                                                                                                        |
| Description:  | Returns the logical AND operation the two operands. The result is TRUE if both operands have the value TRUE. If one of the two operands is FALSE, the result is also FALSE. |

## Logical OR (OR or .OR.) <a href="#logical_or" id="logical_or"></a>

|               |                                                                                                                                                                               |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:       | Operand OR Operand                                                                                                                                                            |
| Data types:   | BOOL                                                                                                                                                                          |
| Return value: | BOOL                                                                                                                                                                          |
| Description:  | Returns the logical OR operation of the two operands. The result is TRUE if one of the two operands has the value TRUE. If both operands are FALSE, the result is also FALSE. |

## Logical exclusive OR (XOR or .XOR.) <a href="#logical_xor" id="logical_xor"></a>

|               |                                                                                                                                                                                                                               |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax:       | Operand XOR Operand                                                                                                                                                                                                           |
| Data types:   | BOOL                                                                                                                                                                                                                          |
| Return value: | BOOL                                                                                                                                                                                                                          |
| Description:  | Returns the logical exclusive OR operation of the two operands. The result is only TRUE if exactly one of the two operands has the value TRUE. If both operands have the same value (TRUE or FALSE) the result is also FALSE. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.videc.de/acron-9.3/en/intro/operator/operator_logisch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
