Barcode: code 128 – AMT Datasouth PAL User Manual

Page 41

Advertising
background image

35

_barcode: Code 128

string beginning with a tilde (~). To get the character tilde, two tildes (~~) are used. These charac-
ters are shown in the following table.

Three characters, \ ( and ), require special handling in PAL. The backslash character, \, is an es-
cape character for encoding special characters in PAL strings. To get the backslash character itself,
you must use a double backslash (\\). The parenthesis characters are used in PAL to indicate the
beginning and ending of a string. To include these characters in a string, they must be proceeded
by a backslash (i.e., \( and \) ).

Code C values are specified as a string of ASCII numerals. Since the Code 128 symbols are made
up of pairs of numerals, there must be an even number of numerals in the string. If PAL encounters
a non-numeral while building a Code C bar code, the string will be rejected with a rangecheck
error.

For Code A and Code B, the character used for a Code 128 symbol is usually the matching ASCII
character. Since there could be a problem getting some of the ASCII control characters in Code A
through some communication systems (not to mention PAL itself), these Code A characters are
requested by using the equivalent character from Code B (e.g. for ACK, use (f)). See the table be-
low for a complete list of all the PAL strings needed to produce Code 128 symbols. Any inap-
propriate ASCII character in the data string will cause the string to be rejected with a rangecheck
error.

A Code 128 bar code must start with a start code indicating the code to be used. If the data string
does not begin with one of the three start codes (~a, ~b, or ~c), a start code for Code B is supplied
by PAL. Code 128 allows the code to be changed within the bar code. If the code is changed, PAL
automatically begins using the rules for the new code.

Advertising