Priority Level Of Operations; Depth Of Program's Control Structure; Reserved Words - Mitsubishi MELFA CR1D Instruction Manual

Table of Contents

Advertisement

4MELFA-BASIC IV
[Caution]
•The operation of the section described with a "-" is not defined.
•The results of the integer and the interger multiplication/division is an integer type for multiplication, and a
real number type for division.
•If the right argument is a 0 divisor (divide by 0), an operation will not be possible.
•During exponential operation, remainder operation or logical operation (including negate), all real numbers
will be forcibly converted into integers (rounded off), and operated.

4.8 Priority level of operations

In the event there are many operators within an expression being calculated, the order of operations is as
shown in
Table
4-12.
Table 4-12:Priority level of operations
Operations, (operators)
1) Operations inside parentheses ()
2) Functions
3) Exponents
4) Single argument operator (+, -)
5) *
/
6) \
7)MOD
8) + -
9)<< >>
10) Comparison operator
(=,<>,><,<,<=,=<,>=,=>)
11)NOT
12)AND
13)OR
14)XOR

4.9 Depth of program's control structure

When creating a program, the depth of the control structure must be considered.
When using the commands in the table below, the program's level of control structure becomes one level
deeper. Each command has a limit to the depth of the control structure. Exceeding these limits will cause an
error.
Table 4-13:Limit to control structure depth
User stack in program

4.10 Reserved words

Reserved words are those that are already used for the system.
A name that is the same as one of the reserved words cannot be used in the program.
Instructions, functions, and system status variables, etc. are considered reserved words.
4-151 Priority level of operations
No. of levels
16 levels
Repeated controls (For-Next,While-WEnd)
8 levels
Function calling (CallP)
800 levels max.
Subroutine calling (GoSub)
The number decreases by usage frequency of For-Next, While-WEnd, and CallP
instructions.
Type of operation
Functions
Numeric value operation
Numeric value operation
Numeric value operation
Numeric value operation
Numeric value operation
Numeric value operation
Logic operation
Comparison operation
Logic operation
Logic operation
Logic operation
Logic operation
Applicable commands
Priority level
High
:
:
:
:
:
:
:
:
:
:
:
:
:
Low

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents