# DISPLAY

Syntax:

Then: DISPLAY
Then: DISPLAY exp

DISPLAY refreshes all fields on the current screen to their current value.

DISPLAY exp switches to screen "exp" and shows most current field values.

Version Ref: 1.x

Description:

DISPLAY is similar to SCREEN, except that instead of putting the user in update mode, DISPLAY simply shows effects of processing up to that point. DISPLAY is especially useful with "when entering field" and "when leaving field" processing.

DISPLAY, by itself, will refresh all the fields (real, dummy, and system maintained) to their current values; the screen backdrop itself will not be redrawn, but all field data on the screen will be refreshed to its current value. In other words, if no argument is given to the DISPLAY command, the program redisplays only the visible fields and leaves all other screen text and messages unchanged.

DISPLAY "exp", will do the same thing, but cause the specified screen (whatever "exp" resolves to), to also be freshly displayed. In other words, the current values of all fields will not just pop in on the existing screen backdrop, the whole screen will be redrawn.

IMPORTANT: DISPLAY is a most necessary command for interactive processing. For instance, if you add two fields together in an @wlf process, the operation will take place. If the result of the calculation (dummy field, or real field) is on the screen, the user will see no change in this field until you issue a DISPLAY statement to bring it to its current value.

Restrictions:

DISPLAY can be used on input processing tables only.

Examples:

@wlf4 If:
Then: 4="OPERATOR" ; end

will appear to do nothing from the user's viewpoint...although it did happen, field 4 was changed.

@wlf4 If:
Then: 4="OPERATOR" ; display ; end

accomplishes the desired result. As soon as the operation is finished, the user is made aware of it. If field 4 is on the screen, the user will see immediately that it is now equal to "OPERATOR".

To display the current screen:

Then: display

To switch to another screen:

Then: display s

where "s" is the screen number or letter.

To switch to a named screen:

Then: display "name"

Make sure you enclose the screen name in quotes if it is a literal name.