Skip to main content
Skip table of contents

If/Else If Command

Overview

The If Command is a conditional statement. It can use "Else If" and "Else", or “End If' according to whether the condition of the "If" syntax is true or false.

Property

Annotation

You can insert text in the description, unique meaning, or nickname for each Parameter to differentiate from many DRL Components.

Example

DRL Code

PY
numbers = [2,5,7]
for number in numbers:
      if number%2==0:
	       tp_log(str(number) + " is even")
      else:
	       tp_log (str(number) + " is odd")
#expected result:
#2 is even
#5 is odd
#7 is odd
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.