exportarraytooml

Exports the Tcl array to the OML variable.

Syntax

set status [exportarraytooml tclvariablename omlvariablename key]

Inputs

tclvariablename
Any valid Tcl variable name as a string.
Type: string
omlvariablename
Any valid OML variable name as a string.
Type: string
Tcl Variable Type OML Variable Type Limitations
Array Struct Keys in the array should be string or char. Values in the array should be Bool, Int, Double, String. Other types of values are exported as strings.
key (optional)
Key of the element in the array. Export entire array if key is not provided.
Type: string

Outputs

status
Status of exporting the Tcl array to the OML variable.
1 = success
"error message" - failure
Type: int | string

Example

array set myArray {k true key2 1 key3 2.2 key4 "4"}
set status [exportarraytooml myArray omlmyArray]
1

Comments

Any error reported by OML is returned as a string. Returns 1 on success.