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

Try Corticon Now

Equals when used as an assignment

SYNTAX

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

DESCRIPTION

Boolean
Assigns the truth value of <Expression1> to <Boolean1>.
DateTime*
Assigns the value of <DateTime2> to <DateTime1>.
Number
Assigns the value of <Number2> to <Number1>. Automatic casting (the process of changing a value's data type) -- which includes DateTime, Date, or Time data types -- will occur when assigning an Integer data type to a Decimal data type. To assign a Decimal value to an Integer value, use the .toInteger operator.
String
Assigns the value of <String2> to <String1>.

USAGE RESTRICTIONS

The Operators row of the table in Vocabulary usage restrictions does not apply. Special exceptions: equals used as an assignment may only be used in Action Rows (section 5 in Sections of Rulesheet that correlate with usage restrictions).

RULESHEET EXAMPLE

The following Rulesheet uses equals twice: in an Action row to assign a value to decimal1, and in an Action row to assign a value to string1 based on the value of boolean1.

SAMPLE RULETEST

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