\ | \\ Command

Prints or displays lines of text.

\TextLine

-Or-

\\TextLine

Parameters

  • \TextLine
    When you use \, the text line is preceded by a carriage return and a line feed.

  • \\TextLine
    When you use \\, the text line is not preceded by a carriage return and a line feed.

    Any spaces preceding \ and \\ are not included in the output line, but spaces following \ and \\ are included.

    You can embed an expression in the text line. If the expression is enclosed in the text merge delimiters (<< >> by default) and SET TEXTMERGE is ON, the expression is evaluated and its value is output as text.

Remarks

The \ and \\ commands facilitate text merge in Visual FoxPro. Text merge makes it possible for you to output text to a file to create form letters or programs.

Use \ and \\ to output a text line to the current text-merge output file and the screen. SET TEXTMERGE is used to specify the text merge output file. If text merge is not directed to a file, the text line is output only to the main Visual FoxPro window or the active user-defined output window. SET TEXTMERGE NOSHOW suppresses output to the main Visual FoxPro window or the active user-defined window.

Example

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE Customer     && Open customer table
SET TEXTMERGE ON
SET TEXTMERGE TO letter.txt
\<<CDOW(DATE( ))>>, <<CMONTH(DATE( ))>>
\\ <<DAY(DATE( ))>>, <<YEAR(DATE( ))>>
\
\
\Dear <<contact>>
\Additional text
\
\Thank you,
\
\XYZ Corporation
CLOSE ALL
MODIFY FILE letter.txt NOEDIT

See Also

_PRETEXT System Variable | SET TEXTMERGE Command | SET TEXTMERGE DELIMITERS Command | _TEXT System Variable | TEXT ... ENDTEXT Command