TEXT

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Display a block of text on the screen or printer


Syntax

TEXT [TO <memvar> [ADDITIVE] [TEXTMERGE] [NOSHOW] [PRETEXT <expC> | <expN>]]

<text to be displayed>

ENDTEXT


See Also

@...SAY, SET DEVICE, TREPORT

Description

The TEXT and ENDTEXT commands can be used to delimit a block of text that will be output to the screen or printer. The Recital/4GL performs & macro substitution on the text unless SET MACROS is OFF. All of the text is displayed exactly as it appears within the TEXT and ENDTEXT commands.

If SET PRINT is ON, then the text will be output to the printer. The printer can be assigned to be the system printer, a location specific printer, or a printer attached to the printer port of the issuing terminal. See the SET PRINTER TO command for full details. If SET ALTERNATE is ON, then the text will be output to the alternate file.

TO <memvar>

If the optional TO <memvar> is included, the text will be sent to the memory variable specified in <memvar>. The variable will be created if it does not already exist. The following keywords can also be used in conjunction with TO <memvar>:


Keyword Description
ADDITIVE If ADDITIVE is specified, the text will be added to the contents of <memvar>, otherwise the contents will be overwritten.
TEXTMERGE Operates as if SET TEXTMERGE is ON.
NOSHOW Disables the display of the text on the screen.
PRETEXT <expC> Inserts the specified character expression, <expC> at the start of each delimited line of text.
PRETEXT <expN> Specifies a numeric flag (1-7) with the following values:

1 – Eliminates spaces before each delimited line. 2 – Eliminates tabs before each delimited line. 4 – Eliminates carriage returns before each delimited line. Multiple options can be specified by adding the values.


Example

set print on
TEXT
The following patrons attended the
BALLET event on 01/10/1999
-------------------------------------
ENDTEXT
use patrons index events, dates, namesseek "BALLET"
list off name, seats, amount;
  while event = "BALLET"
set print off


Products

Recital Server, Recital