The No / Invert block allows you to invert a Boolean value (True/False).
This block is essential for creating negative logic conditions, such as checking that a condition is not met before performing an action.
📥 Entries
- value (Boolean): The Boolean value to invert, which may come from a condition or a variable.
📤 Outings
- value (Boolean): The inverted value (True becomes False, False becomes True).
💡 Example of use
Scenario: Prevent access to a secure area without a badge
- A user attempts to open a secure door.
- The system checks if the variable
aBadgeisTrue(the user has a valid badge). - The value of
aBadgeis connected to the value input of the No block. - The output of the No block is linked to a condition that triggers an alert.
- Behavior:
- If
aBadge=False(no badge), the No block returnsTrue→ the alert is triggered. - If
aBadge=True(valid badge), the No block returnsFalse→ access is authorized.
⚙️ Technical Details
- Logic operation: Pure inversion (
!valuein programming), compatible only with Boolean data. - Error handling: If a non-Boolean value is provided, the block returns
Falseby default.