Difference between revisions of "Single Textmerge"

From Lianjapedia
Jump to: navigation, search
 
Line 11: Line 11:
 
The \ and \\ commands are used to output lines of text to the screen, to a file, or to window.  <text> may also include expressions which are bracketed by < and >.  These expressions will be evaluated before the text is output.
 
The \ and \\ commands are used to output lines of text to the screen, to a file, or to window.  <text> may also include expressions which are bracketed by < and >.  These expressions will be evaluated before the text is output.
  
Delimited expressions may include table field names, memory variables, and functions.  The default text delimiters are < and >.
+
Any spaces, text and delimited expressions following the \ command are preceded by a new line character. Any spaces, text and delimited expressions following the \\ command are not preceded by an end of line marker. The <text> line is then output. Delimited expressions may include table field names, memory variables, and functions.  The default text delimiters are < and >.
  
 
The SET TEXTMERGE DELIMITERS command may be used to change this default.  The SET TEXTMERGE TO command is used to merge text to a file, or a window.  The SET TEXTMERGE ON|OFF command determines whether delimited expressions will be evaluated, or output literally.  Text is output when it is placed after the \ and \\ commands, or when it is between the TEXT...ENDTEXT commands.
 
The SET TEXTMERGE DELIMITERS command may be used to change this default.  The SET TEXTMERGE TO command is used to merge text to a file, or a window.  The SET TEXTMERGE ON|OFF command determines whether delimited expressions will be evaluated, or output literally.  Text is output when it is placed after the \ and \\ commands, or when it is between the TEXT...ENDTEXT commands.
Line 25: Line 25:
 
do while balance > 0
 
do while balance > 0
 
     \Date: {{date()}}
 
     \Date: {{date()}}
     \Name: {{last_name}}  {{first_name}}
+
     \\Name: {{last_name}}  {{first_name}}
  
 
     \Account Number  :  {{account_no}}
 
     \Account Number  :  {{account_no}}

Latest revision as of 07:02, 12 December 2012

Purpose

Output lines of text

Syntax

\ <text> | \\ <text>

See Also

SET TEXTMERGE, TEXT

Description

The \ and \\ commands are used to output lines of text to the screen, to a file, or to window. <text> may also include expressions which are bracketed by < and >. These expressions will be evaluated before the text is output.

Any spaces, text and delimited expressions following the \ command are preceded by a new line character. Any spaces, text and delimited expressions following the \\ command are not preceded by an end of line marker. The <text> line is then output. Delimited expressions may include table field names, memory variables, and functions. The default text delimiters are < and >.

The SET TEXTMERGE DELIMITERS command may be used to change this default. The SET TEXTMERGE TO command is used to merge text to a file, or a window. The SET TEXTMERGE ON|OFF command determines whether delimited expressions will be evaluated, or output literally. Text is output when it is placed after the \ and \\ commands, or when it is between the TEXT...ENDTEXT commands.

Example

open database southwind
use example
set textmerge to balance.txt
set textmerge delimiters to "{{","}}"
set textmerge on
go top
do while balance > 0
    \Date: {{date()}}
    \\Name: {{last_name}}  {{first_name}}
 
    \Account Number  :  {{account_no}}
    \Current Balance  :   {{balance}}
    \Credit Limit:        :   {{limit}}
    \
    skip
enddo
set textmerge off
set textmerge to