Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper 5.3 . Guide To CA-Clipper - <b>text*</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 TEXT*
 Display a literal block of text
------------------------------------------------------------------------------
 Syntax

     TEXT [TO PRINTER] [TO FILE <xcFile>]
        <text>...
     ENDTEXT

 Arguments

     <text> is the block of literal characters to be displayed to the
     screen.  Text is displayed exactly as formatted.

     TO PRINTER echoes the display to the printer.

     TO FILE <xcFile> echoes the display to the specified file.  <xcFile>
     may be specified as a literal file name or as a character expression
     enclosed in parentheses.  If no extension is specified, .txt is assumed.

 Description

     TEXT...ENDTEXT is a console command construct that displays a block of
     text to the screen, optionally echoing output to the printer and/or a
     text file.  To suppress output to the screen while printing or echoing
     output to a file, SET CONSOLE OFF before the TEXT command line.

     Text within the TEXT construct displays exactly as formatted, including
     any indentation.  Hard carriage returns are output as new lines, soft
     carriage returns as the character CHR(141).  Macro variables found
     within TEXT...ENDTEXT are expanded.  However, macro expressions are not.

     TEXT...ENDTEXT is a compatibility command and not recommended.
     CA-Clipper has other facilities for text processing and output.  For
     example, MEMOLINE() in combination with MLCOUNT() can word wrap long
     strings according to a specified line length.  ? or @...SAY can display
     formatted text extracted from a long string with MEMOLINE().

 Examples

     .  This example demonstrates how to use TEXT...ENDTEXT to print a
        form letter:

        USE Sales NEW
        DO WHILE !EOF()
           FormLetter()
           SKIP
        ENDDO
        RETURN

        FUNCTION FormLetter
           LOCAL dDate := DTOC(DATE()), cSalesman := ;
                    RTRIM(Salesman)
           TEXT TO PRINTER
           &dDate.
           Dear &cSalesman.,
           How are you!
           ENDTEXT
           EJECT
           RETURN NIL

 Files   Library is CLIPPER.LIB.


See Also: ?|?? @...SAY MEMOLINE() MLCOUNT() SET CONSOLE

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson