1
function [tree]=sci_setstr(tree)
4
// Conversion function for Matlab setstr()
5
// Input: tree = Matlab funcall tree
6
// Ouput: tree = Scilab equivalent for tree
7
// Emulation function: mtlb_setstr()
12
if X.vtype==String then
14
"In "+expression2code(tree)+" "+expression2code(X)+" is a String"
15
"So result is set to "+expression2code(X)],0)
16
// Because of String concatenation
17
if typeof(X)=="operation" then
19
elseif typeof(X)=="funcall" then
23
elseif X.vtype==Unknown then
24
tree.name="mtlb_setstr"
25
tree.lhs(1).dims=X.dims
26
tree.lhs(1).type=Type(String,Real)
29
if X.dims(1)==1 | is_a_scalar(X) then // Row vector or scalar
30
tree.lhs(1).dims=X.dims
31
tree.lhs(1).type=Type(String,Real)
33
tree.name="mtlb_setstr"
34
tree.lhs(1).dims=X.dims
35
tree.lhs(1).type=Type(String,Real)