Sign in to follow this  
Followers 0
atrX

Scripting Basics: Relational & Logic Operators

1 post in this topic

What are Relational Operators?

Relational operators compare one value to another. The comparison operators available in CoDScript are:

  • == (Tests if the two operands are equal.)
  • != (Tests if the two operands are not equal.)
  • < (Tests if operand 1 is smaller than operand 2.)
  • > (Tests if operand 1 is larger than operand 2.)
  • <= (Tests if operand 1 is smaller than or equal to operand 2.)
  • >= (Tests if operand 1 is larger than or equal to operand 2.)

All relational operators result in a boolean value (true or false).

 

Examples of how to use Relational Operators

Please login or register to see this code.

 

What are Logical Operators?

Logical operators are used to check for multiple conditions (or sometimes if a condition is not true). A logic statement only returns true or false, so to have multiple conditions we use logical operators. Here's a list of the logical operators for CoDScript, what they mean and an example of how to use them:

Please login or register to see this code.
1 person likes this

Share this post


Link to post
Share on other sites
Sign in to follow this  
Followers 0