Xbasic

EVALUATE_TEMPLATE_PRIVATE Function

Syntax

C EVALUATE_TEMPLATE_PRIVATE(C template[,C Macro1[,...C MacroN]])

Arguments

template

An Xbasic expression contained in a character variable.

Macro1

Character

MacroN

Character

Description

Evaluate code with optional macros in its own variable namespace.

Discussion

EVALUATE_TEMPLATE_PRIVATE() executes the Xbasic code specified by Expression in its own variable name-space. This means is that variables outside this call cannot be seen while your Expression is executing and vice-versa. This protects you in case the code you want to run uses a variable with the same name as your calling code and you don't want it to be overwritten.

Example 

Assume the variable "command" is set to: "dim global newVar as C"

Evaluate_template_private(command) -> same as executing the command: "dim global newVar as C"

See Also