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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SAR$ READ<br />

• Text buffer<br />

The text buffer is used to return the characters contained in the image to the calling<br />

program. The characters are taken from the image buffer and placed sequentially in<br />

the text buffer, regardless of the format of the original image or any attributes that<br />

may apply to them. The text buffer provides one part of internal format (see 16.2).<br />

The calling program using the READ and WRITE functions can use the same text<br />

buffer for both functions.<br />

• Attribute table<br />

The attribute table is used to return to the calling program the attributes that apply to<br />

the characters in the text buffer. Each attribute has a one-word entry in the attribute<br />

table which follows the format in Figure 17–1.<br />

index type value<br />

0 17 18 26 27 35<br />

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

The attribute table provides the other part of internal format (see 16.2). If the images<br />

read by SAR$ do not contain any attributes or if UNTRANSLATE_MODE is set to<br />

S'On', then the attribute table may be omitted by setting<br />

ATTRIBUTE_TABLE_ADDRESS to null (zero). The calling program using the READ<br />

and WRITE functions can use the same attribute table buffer for both functions.<br />

• Select list<br />

The select list is used to determine which SAR$ attributes are returned to the calling<br />

program. It contains a sequential list of attribute types that are returned. Attribute<br />

types that are not on the select list are not returned. For example, if the calling<br />

program wants attribute types 3, 4, and 5 returned, the first word of the select list<br />

would be 003004005000. If the select list is omitted, all attribute types are returned<br />

to the calling program.<br />

The calling program must provide all buffers and tables. The type definitions for the<br />

buffers and tables, and definitions for the default buffer and table lengths, are contained<br />

in the element SAR$DEFN. SAR$DEFN is in the <strong>SYSLIB</strong> file (SYS$LIB$*<strong>SYSLIB</strong>) or<br />

SYS$*RLIB$. This element is obtained with the COPY statement. These definitions<br />

simplify the creation of required tables and buffers for the calling program.<br />

7833 1733–004 17–11

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

Saved successfully!

Ooh no, something went wrong!