Export (0) Print
Expand All
Expand Minimize
1 out of 2 rated this helpful - Rate this topic

\ | \\ Command

Prints or displays lines of text.


\TextLine

\\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.

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.

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

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.