Evaluates a Tcl file. Any error reported by Tcl is retuned as a string. Returns 1 on success.
filename |
A fully qualified Tcl filename. Folder must be separated by forward slash, (/), or (\\). |
Evaluates Tcl commands. Any error reported by Tcl is retuned as a string. Returns 1 on success.
command |
Any valid Tcl command as a string. |
Exports HyperMath variable content to Tcl. Supported variables types are numbers, vectors and strings. Any error reported by Tcl is retuned as a string. Returns 1 on success.
hml_var |
The HyperMath variable name. |
tcl_var |
The assigned Tcl variable in quotes. |
Imports Tcl global array content to a HyperMath table. Supported variables types are 1-D arrays.
tcl_var |
The Tcl array name in quotes. |
hml_var |
The assigned HyperMath variable name. It is of the type "table". |
Imports a Tcl global numeric array content to a HyperMath vector. Supported variables types are 1-D numeric arrays.
tcl_var |
The Tcl numeric array name in quotes. |
hml_var |
The assigned HyperMath variable name. It is a vector. |
Example
EvalTclScript("set a 20"); // This will evaluate the Tcl command
EvalTclFile("C:/file.tcl"); // This will evaluate the Tcl file
a=10
ExportToTcl(a,'::b'); // exports the scalar content to a Tcl variable 'b'
b = GetTclVar('::b'); // extracts the variable back into HyperMath
a=[10, 20];
ExportToTcl(a,'::c'); // exports the array content to a Tcl variable 'c'
c= GetTclArray('::c'); // extracts the array back into a HyperMath table
v= GetTclNumArray('::c'); // extracts the array back into a HyperMath vector
Imports a Tcl global variable content to HyperMath. Supported variables types are numbers and strings.
tcl_var |
The Tcl variable name in quotes. |
index |
The index if the above variable is a Tcl array. |
hml_var |
The assigned HyperMath variable name. |
Note | While working in HyperMath, the outputs from any Tcl command can be viewed in the Tcl command window. Also, the debugger will be able to switch between HyperMath and Tcl files. |