DarwinBotsManual
Open the app EspañolES

>=

a b >= leaves true if a is greater than or equal to b: like >, but the limit counts too.

Facts

Word
>=
Family
Comparisons
Integer stack
pops 2, pushes 0
Boolean stack
pops 0, pushes 1
What it does
Pops two numbers a b and pushes true if a, the lower one on the stack, is greater than or equal to b. With an empty stack it gives true.
Cost
Condition
Runs
inside a gene: in the condition (cond) and in the body (start or else)

a b >= pops two numbers and pushes true if a (the lower one) is greater than b (the upper one) or equal to it. 5 3 >= and 3 3 >= are true; 3 5 >= is false.

Use it when the limit value has to be included. Together with <= it builds closed ranges. This gene runs in cycles 10 to 20 of the bot's life (.robage), both included, and counts in cell 50 how many times it ran:

cond
  *.robage 10 >=
  *.robage 20 <=
start
  50 inc
stop

In the end cell 50 holds 11. With > and < instead of >= and <= it would hold 9.

It is exactly the opposite of <: a b >= is true when a b < is false. With the integer stack empty it compares 0 with 0 and gives true. The other comparisons are in Comparisons.