Show/Hide Toolbars

XSharp

Purpose

Prints or displays lines of text

Syntax

\        TextLine
\\        TextLine

Arguments

\ TextLineWhen you use \, the text line is preceded by a carriage return and a line feed.
\\ TextLineWhen 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.

 

 

Description

The \ and \\ commands facilitate text merge in X#.
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.

 

Examples

This example displays a record from a database file using ? and ?? statements with PadR() to assure column alignment:

 

CLOSE DATABASES
OPEN DATABASE (C:\Test\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
 

Assembly

XSharp.VFP.DLL

See Also

SET TEXTMERGE