Difference between revisions of "Single Textmerge"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Output lines of text
 
Output lines of text
 
  
 
==Syntax==
 
==Syntax==
 
\ <text> | \\ <text>
 
\ <text> | \\ <text>
 
  
 
==See Also==
 
==See Also==
[[SET TEXTMERGE]], [[TEXT]], [[TREPORT]]
+
[[SET TEXTMERGE]], [[TEXT]]
 
+
  
 
==Description==
 
==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.
 
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 in UNIX and a carriage return/line feed pair in OpenVMS.  The <text> line is then output.  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 >.
+
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.
 
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
use test
+
open database southwind
 +
use example
 
set textmerge to balance.txt
 
set textmerge to balance.txt
set textmerge to delimiters to "{{","}}"
+
set textmerge delimiters to "{{","}}"
 
set textmerge on
 
set textmerge on
 
go top
 
go top
 
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}}
     \Current Balance : {{balance}}
+
     \Current Balance  {{balance}}
     \Credit Limit:   : {{limit}}
+
     \Credit Limit:       :   {{limit}}
 
     \
 
     \
 +
    skip
 
enddo
 
enddo
 
set textmerge off
 
set textmerge off
Line 39: Line 37:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]

Revision as of 06:58, 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.

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