Skip to main content

Not Equals

Determines whether the two inputs are unequal and returns true or false.

Not Equals block

Description​

The Not Equals block determines whether the two inputs are unequal and returns true or false. This is a code block from the Logic drawer.

Usage​

Determines whether the two inputs are unequal and returns true or false.

Syntax​

Inputs in this block:

  • A number
  • A number

Example​

The model below is of a debilitating disease. Agents that do not have the disease, as determined by an if statement ('if my color != color red'), are able to move normally. While the diseased agents are only able to move at a tenth of their usual speed. The result is a disease that spreads much more slowly, as diseased agents cannot move quickly into groups of healthy agents to infect them.

Not Equals example code
  • Equals - Returns true if inputs are equal
  • Greater Than - Returns true if first input is greater than second
  • Less Than - Returns true if first input is less than second