Siemens A31003-51730-U103-7619 ユーザーズマニュアル
BHB_DCO_05.fm
07/2010
OScAR-Pro Customized Operator, User Manual
OScAR-Pro Customized Operator, User Manual
5-9
For internal use only
The Elements of a DCO-Script
Formulas
5.3
Formulas
Formulas can be used nearly everywhere, e.g. to describe the values of attributes or in func-
tions (see below).
tions (see below).
Formulas are computing instructions that are used to carry out logic operations with integers or
concatenated strings.
concatenated strings.
All Formulas applied in a DCO-Script are output in
@(
@(
and )@ .
Every Formula consists of a statement with a minimum of 2 elements and a logic operation that
lies between these two elements.
lies between these two elements.
For example, if you take the strictly numeric statement @(1 + 2)@, the integers 1 and 2 rep-
resent the elements whereas the + sign represents the logic operation.
resent the elements whereas the + sign represents the logic operation.
Logic operations can be mathematical signs or keywords. You can also add further brackets to
a Formula to add additional statements, e.g. @(1 + ( 2 * 28 ) )@.
a Formula to add additional statements, e.g. @(1 + ( 2 * 28 ) )@.
The following rules apply:
●
Every Parameter, Variable, or Control (see below) as well as every direct entry can be
an element of a statement.
an element of a statement.
●
All elements in a Formula must be of the same data type (e.g. STRING).
●
Do not use any Control names in the Control attributes (see below).
●
Every Formula is processed from left to right and in keeping with the the mathematical
rule "first multiplication and division, then addition and subtraction".
rule "first multiplication and division, then addition and subtraction".
List of logical operations in Formulas:
>
Note:
In every Formula, a space character must be entered in front of and after every state-
ment and in front of and after each logic operation.
In every Formula, a space character must be entered in front of and after every state-
ment and in front of and after each logic operation.
Logical opera-
tion
tion
Effect on
numeric elements
numeric elements
Effect on
text elements
text elements
+
or
ADD
or
ADD
Adds the two integers
Connects two texts
-
or
SUB
or
SUB
Subtracts the second integer
from the first
from the first
(no function)
*
or
MUL
or
MUL
Multiplies the two integers with
each other
each other
(no function)
Table 5-3
List of logical operations in Formulas