Format 5
DISPLAY LINE draws a horizontal or vertical line on the screen.
DISPLAY LINE
[ UPON new-window ]
{ SIZE length }
{ LINES height }
Remaining phrases are optional, can appear in any order.
AT screen-loc
AT LINE NUMBER line-num
AT {COLUMN } NUMBER col-num
{COL }
{POSITION}
{POS }
{REVERSE-VIDEO}
{REVERSE }
{REVERSED }
WITH {COLOR } color-val
{COLOUR}
[CENTERED] TITLE IS title
[LEFT ]
[RIGHT ]
Syntax Rules
- Different formats of the DISPLAY statement may be mixed together in one DISPLAY statement, as long as no ambiguity results.
The effect is the same as specifying each DISPLAY statement separately.
- new-window is a USAGE HANDLE or PIC X(10) data item. If used, the UPON phrase must be the first optional phrase specified.
- screen-loc is an integer data item or literal containing exactly 4 or 6 digits. It may also be a group item of 4 or 6 characters. If
a numeric item is used, it must be a non-negative integer.
- line-num,
col-num,
length, and
height are numeric data items or literals. They may be non-integer values. You can also specify the value of any of these items
with an arithmetic expression.
- color-val is a numeric data item, literal, or arithmetic expression.
- Title is an alphanumeric literal or data item.
- If the UPON phrase is specified, it must be the first optional phrase.
- If the AT phrase is specified, neither the LINE nor the COLUMN phrase may be specified.
- Exactly one of the SIZE or LINES phrases must be specified. The selected phrase may appear anywhere in the statement.
- The LINES phrase can take a numeric expression.
- IS and "=" are synonymous.
- COLUMN, COL, POSITION, and POS are equivalent.
- REVERSE-VIDEO, REVERSE, and REVERSED are equivalent.
- COLOR and COLOUR are synonymous.
General Rules
- The DISPLAY LINE verb provides the ability to draw horizontal and vertical lines in a machine- and terminal-independent fashion.
The lines are drawn using the best mode available on the display device. Used together with the DISPLAY BOX verb, this verb
provides the ability to draw forms on the user's screen.
DISPLAY LINE is an older, character-based technology. If you want fine control over lines displayed on graphical systems,
use the BAR control instead. See Control Types Reference in User Interface Programming for more information.
- The appropriate intersection character (corner or three-way intersection) is used when drawn lines intersect other lines on
the screen.
- If the SIZE phrase is specified, the line drawn is horizontal. The value of
length gives the size of the line in screen columns. If the LINES phrase is used instead, the line drawn is a vertical line and
height describes the number of screen rows to use.
- Lines never wrap around or cause scrolling. If the LINES or SIZE phrase would cause the line to leave the current window,
the line is truncated at the edge of the window.
AT, LINE, and COLUMN Phrases
- The value of
line-num gives the starting row of the line. The value of
col-num gives the starting column. The value of
screen-loc gives the starting row and column. Lines are always drawn to the right or downwards as appropriate.
screen-loc,
line-num, and
col-num must specify a position that is contained in the current window. See
Common Screen Options for more information.
- If the LINE NUMBER phrase is not specified, line one is used. If the COLUMN NUMBER phrase is missing, column one is used.
TITLE Phrase
- The TITLE phrase has effect only when you are drawing horizontal lines. When it is specified,
title-string is printed in part of the line.
- The title may be printed near the right side, near the left side, or in the center of the line depending whether the RIGHT,
LEFT, or CENTERED phrase is specified. If none is specified, CENTERED is used.
COLOR and REVERSE Phrases
The COLOR and REVERSE phrases operate in the same manner as described in Common Screen Options. Note, however, that the COLOR value may not specify blinking, underlining, or an intensity. Lines are always drawn in a
terminal-dependent intensity.