Overview

Expressions are used by the Expression Calc and by the Structure Viewer.  Expressions include arithmetic, logical, and bitwise operations; arithmetic and document functions; conditional statements; and the creation and manipulation of atomic integer variables.

Literal Values

Literal values can be specified in either hex or decimal.   For hex literals, prefix the value with "0x".  

Examples:

-1, 0x0000FFFF, 100, 0x64

Comments

Expressions support single line and multiline comments.  Comment are ignored during parsing and evaluation.

Single line comments

Users can comment out a single line by entering "//" on that line.  All text is ignored from the start of the comment until the next line.

Multiline comments

Users can comment multiple lines (or text within a single line) by wrapping the text between "/*" and "*/" character sequences.  Overlapping and nested comments are not supported.

Expression Types

Simple Expressions

A Simple Expression consists of a single expression.  For example: "1+2".

Compound Expressions

A Compound Expression consists of multiple expressions delimited by semicolons (";").  For example: "variable2 = variable1; variable2 += 1".

More Information