18.08.2013 Views

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

(SYSLIB) Programming Reference Manual - Public Support Login ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

SAR$–Symbolic Access Routines<br />

16.2. SAR$ Internal Format<br />

All of the SDF images handled by the SAR$ functions are placed in internal format.<br />

Internal format provides a common means of handling SDF images in different formats<br />

(nonshift coded, shift-coded, ACD, and so forth). The READ, ATREAD, and COM<br />

functions of SAR$ return SDF images to the calling program in internal format.<br />

The calling program must supply images that will be written out by the WRITE, ATREAD,<br />

and COM functions of SAR$ in internal format.<br />

Internal format consists of the character part and the attribute part.<br />

The character part contains a sequential list of the actual characters contained in the<br />

image. The character part contains no shift codes, attributes, or other special<br />

information. The characters in the character part must be in the ASCII/ISO, ASCII-like, or<br />

JIS-16 (kanji) character sets.<br />

The attribute part contains the attributes that apply to the characters in the character<br />

part. Each attribute is represented as a one-word entry in the attribute table, with the<br />

format in Figure 16–1<br />

index type value<br />

0 17 18 26 27 35<br />

Figure 16–1. SAR$: Attribute Table Entry<br />

The index is an 18-bit integer that indicates the position of the character in the character<br />

part to which this attribute applies. When reading and writing ACD images, the index<br />

range begins with 1 and ends with n, where n is the last 9-bit byte in the character part.<br />

(An index is in 9-bit byte granularity.) When reading and writing shift coded images, the<br />

index range begins with 1 and ends with n + 1. In this case, an index value of n + 1<br />

corresponds to a shift coded image that ends with a shift code and is not followed by<br />

any additional characters. More than one attribute can have the same index. However,<br />

indexes must be in nondecreasing order.<br />

The type is a 9-bit octal value that describes the type of the attribute. The types that are<br />

currently defined are as follows:<br />

001 Reset all attributes to default values<br />

002 The character set type<br />

003 The width of the character<br />

004 The height of the character<br />

005 The horizontal spacing between characters (center to center)<br />

Any number of attributes may apply to the same character.<br />

The value is a 9-bit octal value that provides specific information for the attribute type.<br />

These values are defined in the PLUS COPY element, ACD$VALUES. Table 16-1 lists<br />

the possible values for attribute types.<br />

16–12 7833 1733–004

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!