gettclnumdict

Imports values from Tcl dictionary to the OML variable as an nd matrix.

Syntax

[omlvariablename,status,errormessage] = gettclnumdict (tclvariablename)

Inputs

tclvariablename
Any valid Tcl variable name as a string.
Type: string

Outputs

omlvariablename
Any valid OML variable name.
Type: ndmatrix
Tcl Variable Type OML Variable Type Limitations
Dictionary ND Matrix Values in the dictionary should be one of the following data types (not in combination) Bool, Int, Double. Keys in the dictionary are treated as matrix indexes. Indexes should be comma (",") separated.
status
Status of importing the Tcl dictionary values to the OML variable.
1 = success
0 = failure
Type: number
errormessage
Error message indicating the failure.
Type: string

Example

[status,errormessage]=evaltclscript('set doubleDict [dict create 1,1 1.1 1,2 2.2 1,3 3.3 2,1 4.4 2,2 5.5 2,3 6.6]');
[omlvariablename,status,errormessage]=gettclnumdict('doubleDict')
omlvariablename = [Matrix] 2 x 3
1.10000 2.20000 3.30000
4.40000 5.50000 6.60000
status = 1
errormessage =

Comments

Keys in the Tcl dictionary are treated as matrix indexes. Indexes should be comma (",") separated.