📖⚡AND (Condition)

Apply logical AND to a condition statement.

Syntax

LogicCondition AND LogicCondition [AND LogicCondition]

Example

IF B0 > 0 AND B0 < 5 THEN

  TOGGLE 0

ENDIF


' AND (Condition) Example
' IfAnd.txt
' Kic8 

  ' Initialise our variable so it passes the AND test.
  LET B0 = 3
DO
  ' Test if B0 is greater than zero and less than 5
  IF b0 > 0  AND B0 < 5 THEN
    ' Do something visible
    TOGGLE 0
    ' Wait a short time
    PAUSE 100
  ENDIF

  ' Increase B0 so it fails test later
  LET B0 = B0 + 1
LOOP

 


Related Commands:

todo: Tutorials: Simple Logic