... {AS CHECKBOX}
| {AS ICON}
| {AS SYMBOL}
| {AS LINE} ... .
1. ... AS CHECKBOX
2. ... AS ICON
3. ... AS SYMBOL
4. ... AS LINE
These additions serve to represent special list elements.
The output data object dobj must have certain properties. The additions cannot be used together. If they are used with the additions for
internal formats and external formats, they can only be used to a limited extent.
... AS CHECKBOX
This addition outputs a single-digit checkbox that is ready for input. For dobj, a character-type data type of length 1 is expected. If the first character in dobj is "X" or "x", the checkbox is shown as selected. If the first character is not "X" or "x", the checkbox is shown as empty. If dobj is an empty data object of the type string, the checkbox is not output.
The user can select and deselect the checkbox in the list displayed on the screen. If the user selects the checkbox, the first character of the assigned field in the list is set to "X". If the user deselects it, it is set to blank. The change is stored in the list buffer and can be evaluated during the list results.
If the addition AS CHECKBOX is used, no list output len is allowed after AT. Except for INPUT, NO-GAP, and UNDER, the other additions given at the same time for internal formats and external formats have no effect.
The addition AS CHECKBOX has the same effect as if the
addition INPUT ON were specified simultaneously. The standard
settings or a format INPUT OFF set by a
FORMAT statement are overridden for the current WRITE
statement. To switch off the input readiness of the checkbox, the addition INPUT OFF must be used simultaneously.
Whenever a list line contains solely a checkbox with a blank, it will not be displayed unless the statement SET BLANK LINES ON was executed beforehand.
Output of two checkbox fields and evaluation of the user inputs at the event AT LINE-SELECTION.
REPORT test NO STANDARD PAGE HEADING.
DATA: check1 TYPE c LENGTH 1 VALUE 'X',
check2 TYPE c LENGTH 1 VALUE ' '.
START-OF-SELECTION.
WRITE: / check1 AS CHECKBOX, 'Checkbox 1',
/ check2 AS CHECKBOX, 'Checkbox 2'.
AT LINE-SELECTION.
READ: LINE 1 FIELD VALUE check1,
LINE 2 FIELD VALUE check2.
... AS ICON
This addition outputs icons. Be aware of the fact that not all icons are suitable for print lists. For dobj, data objects of the type c must be specified whose initial characters of the runtime environment can be interpreted as coding of an icon. Such data objects can be declared by including the type group ICON or the general Include programs <LIST> in the global declaration of the program.
In the type group, a constant is declared for each icon that can be displayed. The names of the constants can be taken from the type groups or the output of the executable programs SHOWICON. This program also shows the corresponding output length and whether an icon can be printed or not.
If the content of dobj cannot be interpreted as an icon or the content is changed by concurrent use of other additions for
internal formats or external formats, blanks are output instead of icons.
Displaying a traffic light icon.
INCLUDE <list>.
WRITE icon_green_light AS ICON.
... AS SYMBOL
This addition outputs all the characters of the data object dobj as symbols. By including the
type group SYM or the general Include
program <LIST> in the global declaration part of the program, constants of the length 1 are declared
for each character that can be appropriately displayed as a symbol - that is, characters whose names
show the meaning of the respective symbol. The names of the constants and the meaning and length of
the symbols can be taken from the type group or from the output of the executable program SHOWSYMB.
The output length is determined, as usual, either implicitly by the data type of dobj or by an explicit specification.
Displaying a hand symbol.
INCLUDE <list>.
WRITE sym_left_hand AS SYMBOL.
... AS LINE
This addition outputs line elements of output length 1. Line elements are corner elements, checkmarks, lines, and T elements. For dobj, data objects of the type c must be specified whose content can be interpreted by the runtime environment as line elements. Such data objects can be declared in the global declaration part of the program by including the type group LINE or the general Include program <LIST>.
The type group LINE declares the line element constants displayed in the following table.
Constant | Meaning |
line_space | Blank |
line_top_left_corner | Top left corner |
line_bottom_left_corner | Bottom left corner |
line_top_right_corner | Top right corner |
line_bottom_right_corner | Bottom right corner |
line_horizontal_line | Horizontal line |
line_vertical_line | Vertical line |
line_left_middle_corner | T-element turned to left |
line_right_middle_corner | T-element turned to right |
line_bottom_middle_corner | T-element upside down |
line_top_middle_corner | T-element |
line_cross | Kreuz |
If dobj has a different content or the content is changed through concurrent use of other additions for
internal formats, a blank is output instead of a line element. The addition FRAMES OFF must not be output simultaneously. The other additions for
external formats and QUICKINFO are ignored during output of line elements.
The characters "-" and "|" and output with ULINE are linked
with another as standard if, in between them, there are no other characters. Here the system replaces
the characters by the above line elements. A solitary character "|" is always replaced by a vertical
line. Using the addition AS LINE, line elements are output
exactly as they are defined. Links only occur where real line elements meet each other. The system does
not, however, execute any automatic extensions between the characters "-" or "|" and line elements output explicitly using AS LINE.
Output of four rectangles that belong together.
TYPE-POOLS line.
WRITE: /10 line_top_left_corner AS LINE NO-GAP,
line_top_middle_corner AS LINE NO-GAP,
line_top_right_corner AS LINE,
/10 line_left_middle_corner AS LINE NO-GAP,
line_cross AS LINE NO-GAP,
line_right_middle_corner AS LINE,
/10 line_bottom_left_corner AS LINE NO-GAP,
line_bottom_middle_corner AS LINE NO-GAP,
line_bottom_right_corner AS LINE.