Document Properties
Kbid
2H4752
Last Modified
04-Feb-2020
Added to KB
20-Jun-2013
Public Access
Everyone
Status
Online
Doc Type
References
Product
  • ICM 7.10
  • ICM 11
Reference - ISML Operators

Introduction

An operator is a symbol that represents a specific action. For example, a plus sign (+) is an operator that represents addition. Operators are used within ISML Expressions and allow you to manipulate numerical and string values stored as variables or constants. In case one or more operators are not of the required types as described below, a runtime exception will occur.

References

Reference - ISML Expressions

Arithmetic Operators

The standard arithmetic operators are addition, subtraction, multiplication and division. Arithmetic operators take numerical values (either literals or variables) as their operands and return a single numerical value. Arithmetic operators work the same in ISML expressions as they do in other common programming languages.

Note

Division by zero is not defined and will result in a runtime exception.

The examples in the table below assume that var has been assigned the value 2.

Operator

Description

Examples Returning Value 5

+

Addition

var + 3

-

Subtraction

7 - var

*

Multiplication

2,5 * var

/

Division

10 / var

Arithmetic Comparison Operators

These operators compare numerical operands and return a Boolean value based on whether or not the comparison is true. The table below shows valid operators.
Operands for arithmetic comparison operators must be classes of type number and their subclasses, e.g., money. The result is of type Boolean.

The examples in the table below assume that var has been assigned the value 2.

Operator

Description

Examples Returning True

==

Equal: Returns true if the operands are equal.

var == 2

!=

Not Equal: Returns true if the operands are not equal.

var != 0

>=

Greater Than or Equal To: Returns true if the left operand is greater than or equal to the right operand.

3 >= var; 2 >= var

<=

Less Than or Equal To: Returns true if the left operand is less than or equal to the right operand.

var <= 5; var <= 2

>

Greater Than: Returns true if the left operand is greater than the right operand.

12 > var

<

Less Than: Returns true if the left operand is less than the right operand.

1 < var

Logical Operators

Logical operators are used to build complex expressions that evaluate to true or false.

Type of operands: Boolean; result type: Boolean.

For the examples in the table below assume that variable var_true has been assigned the value of true and var_false the value of false.

Operator

Description

Examples Returning True

AND

Returns true if both operators are true.

var_true AND var_true

OR

Returns true if at least one of the two operators is true.

var_true OR var_false
var_false OR var_true

NOT

Returns true if its single operator is false, otherwise it returns false

NOT var_false

String Concatenation Operator

Use the Concatenation Operator to concatenate two strings and return another string that is their union. If an operand is not a string, it is automatically converted into a string.

Type of operands: String, result type: String.

Operator

Description

.

Period: Returns the concatenation of two string operands.

String Comparison Operators

These operators compare string operands and return a logical value based on the comparison. The value is equal only if both combined strings contain exactly the same characters. In the case that an operand is not of type string, it is automatically converted into a string.

Type of operands: String, result type: Boolean.

Operator

Description

EQ

Returns true if the two string operands are equal, otherwise false.

NE

Returns true if the two string operands are not equal, otherwise false.

Reference - ISML Reference

Disclaimer
The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.
The Intershop Knowledge Portal uses only technically necessary cookies. We do not track visitors or have visitors tracked by 3rd parties. Please find further information on privacy in the Intershop Privacy Policy and Legal Notice.
Home
Knowledge Base
Product Releases
Log on to continue
This Knowledge Base document is reserved for registered customers.
Log on with your Intershop Entra ID to continue.
Write an email to supportadmin@intershop.de if you experience login issues,
or if you want to register as customer.