beautypg.com

2 line continuation, 3 limitations, 4 expressions and operators – ElmoMC SimplIQ Software Manual User Manual

Page 33: 1 numbers, Line continuation -4, Limitations -4, 4 expressions and operators -4, Numbers -4

background image

SimplIQ

Software Manual

4BThe

SimplIQ

User Programming Language

MAN-SIMSW (Ver. 1.4)

5-4

5.3.2

Line Continuation

A user program may contain a line that is too long, and whose representation on the screen
is not easily readable because not all its symbols are shown on the screen. In order to
improve program readability, the expression can be continued on the next line by using an
ellipsis (three periods) to indicate that the line continues.

Example:
c = 12 * a + sqrt(2) - sin(3.14 / 2) + 7 ^ 3 *

(6 + b) * 34

The ellipsis (…) at the end of the first line indicates that this expression is not complete and
is continued on the next line.

5.3.3

Limitations

Every line of user program text may contain a maximum of 128 characters (for proper on-
screen readability). If a text line exceeds this value, the Compiler issues an error.

Expressions also have limitations: the maximum admissible length of an expression is 512
symbols, not including comments and ellipses. If a program contains a complex expression
that takes multiple lines, and the summary length of the expression (without comments and
ellipses) exceeds 512 characters, the Compiler issues an error.

User program text is also limited according to the specific

SimplIQ

drive. The list of setup

parameters that limit a user program are:
ƒ

Maximum length of user program text

ƒ

Maximum number of routines, including functions, labels and auto-routines

ƒ

Maximum number of variables, both global and local

ƒ

Maximum length of data segment — space for storing global variables

ƒ

Maximum length of code segment — space for compiled code

ƒ

Maximum depth of stack — working space for the program.

The Elmo Studio IDE enables a user to view these parameters.

5.4

Expressions and Operators

5.4.1

Numbers

The number syntax in the user program language is similar to that of the Interpreter
language (

section

4.2.1

), although ranges and range-exceeding behavior differ. A user

program can be compiled on the PC in off-line mode (without communication), so that it has
more resources than the Interpreter does.

The range for floating-point numbers is [-1e38…+1e38], which is greater than that of the
Interpreter language. If an integer number exceeds the integer range, it is interpreted as a
floating-point number, while the Interpreter interprets it as an error. If a floating-point
number exceeds the floating-point range, it is interpreted as an error.