skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Equals when used as a comparison
 

Try Corticon Now

Equals when used as a comparison

SYNTAX

Boolean
<Expression1> = <Expression2>
DateTime*
<DateTime1> = <DateTime2>
Number
<Number1> = <Number2>
String
<String1> = <String2>

DESCRIPTION

Boolean
Returns a value of true if <Expression1> is the same as <Expression2>.
DateTime*
Returns a value of true if <DateTime1> is the same as <DateTime2>, including both the Date and the Time portions
Number
Returns a value of true if <Number1> is the same as <Number2>. Different numeric data types may be compared in the same expression.
String
Returns a value of true if <String1> is the same as <String2>. Both case and length are examined to determine equality. Corticon Studio uses the ISO character precedence in comparing String values. See Character precedence: Unicode and Java Collator.
*includes DateTime, Date, and Time data types

USAGE RESTRICTIONS

The Operators row of the table in Summary Table of Vocabulary Usage Restriction applies. No special exceptions.

RULESHEET EXAMPLE

The following Rulesheet uses equals to Ruletest whether decimal1 equals decimal2, and assign a value to string1 based on the result of the comparison.

SAMPLE RULETEST

A sample Ruletest provides two examples. Input and Output panels are shown below: