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$ WRITE<br />

• Image buffer<br />

The image buffer is used to construct individual images from information in the text<br />

buffer and attribute table and move them into the output buffer. Because images<br />

can be written in different formats, this buffer is necessary to relieve the calling<br />

program from having to build these formats. The calling program never needs to<br />

access the image buffer, but it must provide it to SAR$. The calling program using<br />

the READ and WRITE functions of SAR$ can use the same image buffer for both<br />

functions.<br />

• Text buffer<br />

The text buffer is used to pass the characters of the output image to SAR$. The<br />

calling program must place the characters sequentially in the text buffer, regardless<br />

of the eventual output format or attributes that may apply to the characters. The<br />

text buffer is one part of internal format (see 16.2). The calling program using the<br />

READ and WRITE functions of SAR$ can use the same text buffer for both<br />

functions.<br />

• Attribute table<br />

The attribute table is used to pass to SAR$ the attributes that apply to the characters<br />

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

follows the format in Figure 18–1.<br />

index type value<br />

0 17 18 26 27 35<br />

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

The calling program places the attribute entries into the attribute table. The attribute<br />

table is the other part of internal format (see 16.2). If the output images will not<br />

contain any attributes or if UNTRANSLATE_MODE is set to S (on), the attribute table<br />

may be omitted by setting ATTRIBUTE_TABLE_ADDRESS to null (zero). The calling<br />

program using the READ and WRITE functions of SAR$ can use the same attribute<br />

table for both functions.<br />

All buffers and tables must be provided by the calling program. The type definitions for<br />

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

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

SYS$*RLIB$. They may be obtained with the COPY statement. These definitions<br />

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

7833 1733–004 18–11

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

Saved successfully!

Ooh no, something went wrong!