Click or drag to resize

TextMerge Function

X#
Provides evaluation of a character expression.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
[NeedsAccessToLocalsAttribute(FALSE)]
 FUNCTION TextMerge(
	cExpression,
	lRecursive,
	cLeftDelim,
	cRightDelim
) AS STRING CLIPPER
Request Example View Source

Parameters

cExpression (Optional)
Type: Usual
Specifies the string expression to be evaluated.
lRecursive (Optional)
Type: Usual
Specifies whether to repeatedly iterate through all levels of delimiters in cExpression, evaluating until no text merge delimiters remain.
cLeftDelim (Optional)
Type: Usual
Specifies the left delimiter to use for the text merge search. cLeftDelim is limited to two characters.
cRightDelim (Optional)
Type: Usual
Specifies the right delimiter to use for the text merge search. cRightDelim is limited to two characters.

Return Value

Type: String
Character string. Represents the value of cExpression, the merged text.
Remarks
The cLeftDelim and cRightDelim parameters temporarily override any Set TEXTMERGE DELIMITERS values.
The TEXTMERGE( ) function responds to current settings of Set TEXTMERGE SHOW | NOSHOW.
Examples
X#
 1Set TEXTMERGE OFF
 2TEXT to myvar noshow //textm
 3this is a test   <<datetime()>>
 4<<program(-1)>>
 5<<myvar>>
 6textmerge(myvar) (this line is literal)
 7<<doit(myvar)>>   (cause recursion
 8END of orig text
 9endtext
10?myvar
11?"Now starting textmerge"
12?textmerge(myvar)
13PROCEDURE doit(myvar)
14*  r=i   // cause an error
15if program(-1) > 3
16return "THEEND*********"
17endif
18return textmerge(myvar)
See Also