Difference between revisions of "Single Textmerge"
Yvonne.milne (Talk | contribs) m (1 revision) |
Yvonne.milne (Talk | contribs) |
||
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]] | + | [[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. | ||
− | + | 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 | + | open database southwind |
+ | use example | ||
set textmerge to balance.txt | set textmerge to balance.txt | ||
− | set textmerge | + | 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}} | |
\Account Number : {{account_no}} | \Account Number : {{account_no}} | ||
− | \Current Balance | + | \Current Balance : {{balance}} |
− | \Credit Limit: | + | \Credit Limit: : {{limit}} |
\ | \ | ||
+ | skip | ||
enddo | enddo | ||
set textmerge off | set textmerge off | ||
Line 39: | Line 37: | ||
</code> | </code> | ||
− | |||
− | |||
− | |||
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Commands]] | [[Category:Commands]] |
Revision as of 06:58, 12 December 2012
Contents
Purpose
Output lines of text
Syntax
\ <text> | \\ <text>
See Also
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