Not

From StarLogo Nova Wiki
Other languages:
The Not Block

Usage

Negates the input. So, if the expression evaluates to true, then returns false. If the expression evaluates to false, then returns true.

Syntax

Inputs in this block:

  1. a comparative statement block (= statements, > statements, not statement, and/or statements)

Example

Not example code

This is a model of mosquitoes spreading malaria through a population of adults and children. A small portion of the population has sickle cell anemia which reduces the agent's susceptibility to malaria. When the custom trait ‘sickle cell anemia’ or ‘malaria’ equals 1, the agent has the disease. When the malaria trait is set to 0, the agent does not have malaria. The not block allows the code to isolate the agents without sickle cell anemia.