Examples – Compuprint 6314 CZL User Manual
Page 50

CZL – Programmer Manual
50
5.
E
XAMPLES
The following examples clarify the meaning of the commands described in previous sections.
Since all CZL commands are comprised of printable characters, it does not matter whether they are
sent through a simple program (e.g. Basic) or with text file.
For a detailed description of each command, please refer to the preceding pages.
5.1 Example with alphanumeric strings, bar-codes, and
boxes
The following example was developed in Basic, and its result appears in fig. 5 on page 52.
CONST SCRITTA1$ = "1234567890"
CONST SCRITTA2$ = "1234567890"
CONST SCRITTA3$ = "1234567890"
CONST SCRITTA4$ = "1234567890"
CONST SCRITTA5$ = "123456"
CONST CODE2OF5TXT$ = "12345678"
CONST EAN8TXT$ = "12345670"
CONST ANSITXT$ = "123"
CONST SCRITTA6$ = "CODE EAN-8"
CONST SCRITTA7$ = "CODE 2 OF 5"
CONST SCRITTA8$ = "ANSI CODABAR "
CONST SCRITTA9$ = "CZL Language"
'OPEN "lpt1:" FOR OUTPUT AS #1
OPEN "COM2:9600,n,8,1,cs5000" FOR OUTPUT AS #1
PRINT #1, "^XA"
PRINT #1, "^LH0,0"
PRINT #1, "^PRA"
PRINT #1, "^MD7"
PRINT #1, "^FWN" 'SETTING OF ROTATION
PRINT #1, "^BY2" 'WIDTH OF NARROW BAR BAR-CODE
PRINT #1, "^FO50,20" 'LARGE BOX
PRINT #1, "^GB720,480,4^FS"
PRINT #1, "^FO100,40" 'SMALL BOX
PRINT #1, "^GB320,210,2^FS"
PRINT #1, "^FO50,260" 'HORIZONTAL LINE
PRINT #1, "^GB720,0,3^FS"
PRINT #1, "^FO450,20" 'VERTICAL LINE
PRINT #1, "^GB0,480,2^FS"