DI-159 PLC Hardware Manual
StickOS
Expressions
the following operators are supported as in C, in order of decreasing precedence:
n
decimal constant
0xn
hexadecimal constant
'c’
character constant
variable
simple variable
variable[expression]
array variable element
variable#
length of array or string
(
)
grouping
! ~
logical not, bitwise not
* / %
multiply, divide, mod
+ -
add, subtract
>> <<
shift right, left
<= < >= >
inequalities
== !=
equal, not equal
| ^ &
bitwise or, xor, and
|| ^^ &&
logical or, xor, and
Strings
V$ is a null-terminated view into a byte array v[]
string statements:
dim, input, let, print,
vprint
if
expression relation
expression
then
while
expression relation
expression
do until
expression rela-
tion expression
string expressions:
"
literal
"
literal string
variable
$
variable string variable$
[
start:length
]
variable substring
+
concatenates strings
string relations:
<= < >= >
inequalities
== !=
equal, not equal
~ !~
contains, does not contain
General Statements
16
Содержание DI-159
Страница 51: ...StickOS DI 159 PLC Hardware Manual 4 is even _ 51...
Страница 76: ...DI 159 Block Diagram 76...
Страница 77: ...Dimensional Drawing 77...