Command TEXT Foundation
Displays, outputs or assigns literal text.
TEXT [TO PRINTER] | [TO FILE <cFilename>]
<Text>
ENDTEXT
or
TEXT [INTO <variable> [TRIMMED]] |
[INTO <variable> WRAP] |
[INTO <variable> WRAP <cLineBreak> [TRIMMED]]
<Text>
ENDTEXT
The command TEXT...ENDTEXT designate a block of text in the source code which is to be output to the screen, the printer, a file or to be assigned to a variable. Macro variables are replaced, but not macro expressions. To suppress output on the screen, the command SET CONSOLE OFF must be executed before this command is called, unless TEXT INTO is used.
The text is output as it appears in the source code, including indentation using blank spaces or tab characters. If TEXT INTO .. TRIMMED is used, the text will be left trimmed, ie. spaces will be removed from the left side.
// In the example, TEXT...ENDTEXT is used to save
// literal text to a variable.
PROCEDURE Main()
LOCAL cHtml, cText
TEXT INTO cHtml WRAP
<table width="710" border="2">
<tr bgcolor="#000066">
<td width="224">Hi
</td>
</tr>
</table>
ENDTEXT
/* The cHtml contains the text as found in the
* source code using default line breaks
*/
OutStd(cHtml)
TEXT INTO cText WRAP ";" TRIMMED
Thank you for purchasing our product.
Please register your software to benefit
from the 30 days of free technical support
and to receive the latest information about
our products.
ENDTEXT
/* The cText variable contains text that has no spaces on the
* left side and the line break character conforms to the format
* expected by Alert().
*/
Alert(cText)
RETURN
// In the example, TEXT...ENDTEXT is used for output of
// help text which describes the correct way to call the
// program from the command line.
PROCEDURE Main( cUserID, cMaxRow )
IF PCount() == 0
CLS
TEXT
To execute use:Testprog <UserID> [ 25 | 43 | 50 ]
<UserID> - User identification
[Number] - Number of lines in the window
ENDTEXT
QUIT
ENDIF
IF PCount() == 2
SetMode( Val(cMaxRow), 80 )
ENDIF
? "User ID:", cUserID
RETURN
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.