Click or drag to resize

StrEvaluate Function

Allows text substitution in strings entered at runtime.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.6
Syntax
 FUNCTION StrEvaluate(
	cString AS STRING
) AS STRING
Request Example View Source

Parameters

cString
Type: String
A string containing one or more macro variables to expand.

Return Value

Type: String
The new string, after all macro substitutions have taken place.
Remarks
Examples
This example demonstrates StrEvaluate() on a string entered at runtime that contains a macro variable:
X#
1MEMVAR cOne
2LOCAL cTwo AS STRING
3cOne := "world"
4ACCEPT "Enter a macro string " TO cTwo
5// If you type "Hello &cOne" (without quotes)
6? cTwo                        // Result: "Hello &cOne"
7? StrEvaluate(cTwo)            // Result: "Hello world"
See Also