9 Output Operations

The LDISP Statement

NOTE: The LDISP Statement is available on the HP-UX platform, only.

The LDISP (line display) statement outputs text and variables on the display, like DISP, but the output is placed on a complete display line, rather than in separate fields. Syntax for the LDISP statement is as follows:

LDISP [display list]

The display list can contain the same item types as with DISP. Each item must be separated by either a comma (open spacing) or a semicolon (pack items together). The LDISP operation skips over any protected display lines and outputs the list on the first unprotected line found. See page 274 later in this chapter.

Here is an example sequence which uses LDISP to replace a previously-output message with another:

110  DISP "C/H C/S"! Cursor Home/Clear Screen characters
120  INPUT "ØØØØØENTER TODAY'S DATE:";Date$
130  DISP "ญญ"
140  LDISP "SELECT PROCEDURE BELOW:"
Line 110 outputs display-control characters (C/H C/S - the exact representation of these characters may vary from screen to screen) used to clear the display. Line 120 uses display control characters to position the cursor before displaying each string (ØØØØØ). Line 130 then repositions the cursor so that line 140 will erase the input-prompt line and display the last message. Note that the CURSOR statement can be used in place of display-control characters to position the cursor. See page 268 later in this chapter.

The display-control characters are output in a DISP statement (line 130), rather than in the LDISP statement. This is because LDISP is a "line output" operation (like CATALOG and LIST), so it does not execute display-control characters; it displays the actual characters instead. This allows you to use these characters in displayed messages, as shown in the following example:

190  LDISP "TODAY'S DATE IS ó-->-->-->";Date$
It also allows recalling the entire contents of a string variable containing display-control characters. For example, executing the line below clears the display and then displays ABC:

A$="C/H C/S ABC"
Executing an expression from the keyboard actually performs an "implied LDISP". To recall the entire value of A$, do not execute DISP A$ (an item output operation), but execute LDISP A$ (a line output operation).


Eloquence Language Manual - 19 DEC 2002