Developer Documentation Library > UNICOM Intelligence Function Library > Miscellaneous functions > Execute
 
Execute
Executes one or more specified statements.
Syntax
Execute(<script>)
Parameters
<script>
Type: Text
Statements to execute.
(return)
Type: Long
Always zero.
Notes
<script> is parsed using the first available parser, and then executed. This function can be used from scripts only; if you try to use it in an expression that is executed by the UNICOM Intelligence Data Model, an error occurs.
The input and output locales and the variables in use in the calling program are passed to this function and used when parsing and executing the script. The state of the calling program is shared with the new program, so that any calls to other functions such as Rot and Ran have the same effect as they would if they were called directly by the calling program.
This function is similar to the Execute function in VBScript.
Example
In the following mrScriptBasic example, Execute assigns the value returned by the DateNow function to the MyDate variable.
Dim MyDate
Execute("MyDate = DateNow()")
See also
Eval
Miscellaneous functions