Skip to main content

Equals

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

Equals block

Description​

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

Usage​

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

Syntax​

Inputs in this block:

  • A number
  • A number

Example​

This is an epidemic model. The blocks below display an agent developing immunity. To accomplish this, sick turtles are identified by checking if they have a red color and then they receive a timer using the yield block before they develop immunity.

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