EMS Manual
EMS Procedures
EMS Manual—426909-005
15-21
EMSTEXT Procedure
n is the number of logical lines required to display the message text (the value
of number-display-lines on page 15-21)
When EMSTEXT buffers the text of an event message, it also saves—in the array
actual-lengths—the length of the text line to be displayed within each logical line.
This length includes the number of blanks (if any) by which the text is indented, and the
number of text characters, but not the number of trailing blanks. EMSTEXT saves this
information, so your output device need not print or display trailing blanks when putting
out the message.
display-line-length
INT:value
is the number of character spaces (bytes) in each logical line in displayable-
text-buffer. This number is referred to as d previously.
For d, choose the maximum number of characters displayable or printable on your
output device, such as 80 or 132.
number-display-lines
INT:value
is the number of logical lines needed in displayable-text-buffer to display
the message text. This number is referred to as n.
When estimating n, check that the number of text characters on the first line does
not exceed d, and on succeeding lines it does not exceed d - i, where i is the
value of indent.
actual-lengths
INT .EXT:ref:*
is an integer array. The array contains n integers, where n is the value of number-
display-lines. Each integer denotes the length of the display line—the number
of indent blanks and text characters—within a logical line in displayable-text-
buffer. If a logical line is not used (has no text), the corresponding integer in the
array is -1.
In other words, for each logical line in displayable-text-buffer, the
corresponding integer in this array tells how many bytes to display, starting from
the beginning of the line.
header-template-key
INT .EXT:ref:10
Note. You must make the buffer size, d * n, large enough to hold the entire text, including
trailing and indent blanks. You will probably set d to the standard line length for your output
device—80 characters, for instance. Making the buffer large enough then depends directly on
the value you choose for n. If you make n too small, the displayed text is truncated.