4 expressions, 1 types of expressions, 1 maxl primary expressions – ElmoMC Multi-Axis Motion Controller-Maestro User Manual

Page 75: Debug strings

Advertising
background image

• The type of result does not depend upon the type of operands. The

result of a logical operation is either true (1) or false (0).

• Operator ‘%’(modulo) is used only for integer operands.

• Bitwise operators are used only for integer operands.

5.4

Expressions

Expressions are sequences of operators and operands that are used for one or more of
these purposes:

• Computing a value from the operands.

• Designating objects or functions.

• Generating “side effects.” (Side effects are any actions other than the

evaluation of the expression — for example, modifying the value of an

object.)

5.4.1

Types of Expressions

MAXL expressions are divided into several categories:

Primary expressions

. These are the building blocks from which all other

expressions are formed.

Postfix expressions

. These are primary expressions followed by an operator

— for example, the array subscript or postfix increment operator.

Expressions formed with unary operators

. Unary operators act on only one

operand in an expression.

Expressions formed with binary operators

. Binary operators act on two

operands in an expression.

Logical Operators

. Used to combine multiple conditions formed using

relational or equality expressions.

Simple Assignment

.

5.4.1.1 MAXL Primary Expressions

Primary expressions are the building blocks of more complex expressions. They are
literals and names.

Syntax

primary-expression:

literal
( expression )
name

A literal is a constant primary expression. Its type depends on the form of its
specification. See

Literals

for complete information about specifying literals.

Maestro

Software Manual

MAXL Program Language

MAN-MASSW (Ver. Q)

5-13

Advertising