skip to main content
Corticon Studio: Rule Language Guide : Rule operator details and examples : Increment
 

Try Corticon Now

Increment

SYNTAX

<Number1> += <Number2>

DESCRIPTION

Increments <Number1> by the value of <Number2>. The data type of <Number1> must accommodate the addition of <Number2>. In other words, an Integer may not be incremented by a Decimal without using another operator (such as .toInteger or Floor.floor) to first convert the Decimal to an Integer.

USAGE RESTRICTIONS

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

RULESHEET EXAMPLE

This sample Rulesheet uses increment to increment integer1 by the value of integer2 when boolean1 is true.

SAMPLE RULETEST

A sample Ruletest provides three examples of integer1, integer2, and boolean1. Input and Output panels are shown below.