gettcllist

Imports the Tcl list to the OML variable.

Syntax

[omlvariablename,status,errormessage] = gettcllist (tclvariablename, index)

Inputs

tclvariablename
Any valid Tcl variable name as a string.
Type: string
index (optional)
Any valid Tcl list index as a number. If index is input then logical | number | string is returned, else cell is returned.
Type: number

Outputs

omlvariablename
Any valid OML variable name.
Type: cell | logical | number | string
Tcl Variable Type OML Variable Type Limitations
List Cell (1,n) n:number of elements in list. Supports only if the list contains following Tcl data types: Bool, Int, Double, String. Other data types are exported as strings.
status
Status of importing the tcl list value to the OML variable.
1 = success
0 = failure
Type: number
errormessage
Error message indicating the failure.
Type: string

Example

[status,errormessage]=evaltclscript('set y [list 3 5 4 7]');
[omlvariablename,status,errormessage]=gettclvar ('y')
omlvariablename = 
{
[1,1] 3
[1,2] 5
[1,3] 4
[1,4] 7
}
status = 1
errormessage =