EasyManua.ls Logo

Linx 7900 - Page 88

Linx 7900
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 23 of 38 FA69356–2 English
Jun 2013
38
How To Create Date and Time
Formats
Linx 5900 & 7900
3.3 Macro examples
3.3.1 Example 1
length = 3
use “ABC”
This simple example shows you the smallest structure for a Macro element. The example
generates a string that does not change. (Normally you do not use a Macro element for this
purpose).
The printer prints the text “ABC”.
3.3.2 Example 2
length = 3
use (yoc/2)
This example uses the time value ‘YOC’ (‘year of century’). The printer divides the value by
2, and uses two digits to display the result. The printer uses the default alignment (left
alignment) because there are no format symbols.
The Length command sets the length of the element to 3, so that there is a space after each
number. The space separates the Macro element from any element that follows.
For the years 2006, 2007, 2008, 2009,... the printer prints the text 03”,03”,04”,04”...
3.3.3 Example 3
length = 3
use (doy)0#
This example prints the day of the year, as a 3-digit string, right aligned with leading zeros.
The printer prints the text “001”, “002”, “003”,...
3.3.4 Example 4
length = 4
if ((doy % 2) > 0)
{
use “AAA ”
}
else use “BBBB”
This example generates the following text strings:
AAA “ if the time value ‘day of year’ is 1, 3, 5, 7... ...363, 365.
“BBBB” if the time value ‘day of year’ is 2, 4, 6, 8... ...364, 366.
There is a space at the end of the string “AAA ” because both strings must have the same
length.
This example uses the remainder symbol “%”.

Table of Contents

Other manuals for Linx 7900

Related product manuals