property ExMenu.TemplateResultN as Double
Gets the result of the last Template call, as double.

TypeDescription
Double A Double expression that indicates the result of the last Template call. The TemplateResult property gets the result as variant. The TemplateResultS property gets the result as string.
The TemplateResult, TemplateResultN, TemplateResultS property returns the result of the last Template call, as variant, numeric (double) or as string. The Template property takes a string called x-script, and executes it. For instance, you can use the TemplateDef, Template, TemplateResult or ExecuteTemplate to work with x-script. It is known that programming languages such as dBASE Plus, XBasic from AlphaFive, Wonderware, does not support setting a property with multiple parameters. In other words, these programming languages does not support something like Property(Parameters) = Value, so our controls provide an alternative using the TemplateDef method.

For instance, the Wonderware does not support parameters for events, or parameters of any event are not defined during the event, so in this case, you require an alternative in order to get the value for these parameters. Let's say the Select event, which has one parameter ID of long type, which indicates the identifier of the item being selected. The EventParam property gets the value for any parameter of a specified event. The same, the EventParam requires parameters so Wonderware won't support it, in this case, the Template and TemplateResult can be used to get the ID parameter of the Select event as follows:

DIM id As Message
#exMenu1.Template = "EventParam(0)";
id = #exMenu1.TemplateResultS;
MessageBox(id, "Identifier", 0);

This code must be called during the Select event, else the EventParam has no effect.

The Template script (x-script) is composed by lines of instructions. Instructions are separated by "\n\r" ( newline ) characters.

An instruction can be one of the following:

The Template supports the following general functions: