EasyManua.ls Logo

Linx 5900 - Page 86

Linx 5900
557 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Page 21 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
Example 2
if ((moh = 59) & (dow = 7))
{
use “AAA”
}
The program in this example has a different layout—see ‘Blocks’.
In example 2, the printer uses the text string “AAA” if:
The ‘minute of hour’ is 59, and
The ‘day of week’ is 7.
In example 2, the “&” symbol compares two logical expressions. The logical expressions in
this example are:
“(moh = 59)”
“(dow = 7)”
When you compare two logical expressions (which are each true or false), the result of the
comparison is also ‘true’ or ‘false’. You can use one of the following two comparator
symbols.
3.2.5 Blocks
In example 2, the If comparison and the Use command are on separate lines. If you separate
the lines, you must insert the “{“ and “}” brackets as shown (use the correct type of brackets).
You can insert a number of lines (a block’ of lines) between the brackets. The following
example shows a block that contains three lines:
if (hod < 12)
{
if (dow = 1) use “AAA”
if (dow = 2) use “BBB”
if (dow = 3) use “CCC”
}
}
NOTE: In the above example the lines are formatted to make the structure clear.
Symbol Name Result of comparison
&AND ‘True’ if the left expression and the right expression are both true.
‘False’ if the left expression or the right expression is false.
|OR ‘True’ if the left expression is true or the right expression is true.
‘False’ if the left expression and the right expression are both false.
Figure 26. Logical comparator symbols

Table of Contents

Other manuals for Linx 5900

Related product manuals