1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) ???? - INRIA - Scilab
4 // Copyright (C) 2012 - 2016 - Scilab Enterprises
6 // This file is hereby licensed under the terms of the GNU GPL v2.0,
7 // pursuant to article 5.3.4 of the CeCILL v.2.1.
8 // This file was originally licensed under the terms of the CeCILL v2.1,
9 // and continues to be available under such terms.
10 // For more information, see the COPYING file which you should have received
11 // along with this program.
13 function txt=infer2txt(infer)
16 if typeof(infer)=="infer" then
17 for l=1:size(infer.dims)
18 dims=[dims,string(infer.dims(l))]
21 error(gettext("Not yet implemented."))
30 elseif or(tp==[4,6]) then
34 for k = 1:size(infer.contents.index)
35 if typeof(infer.contents.index(k))<>"list" then
36 txt=[txt;expression2code(list(infer.contents.index(k)))+infer2txt(infer.contents.data(k))]
38 txt=[txt;expression2code(infer.contents.index(k))+infer2txt(infer.contents.data(k))]
43 for k = 1:size(infer.contents.index)
44 if typeof(infer.contents.index(k))<>"list" then
45 txt=[txt;expression2code(list(infer.contents.index(k)))+infer2txt(infer.contents.data(k))]
47 txt=[txt;expression2code(infer.contents.index(k))+infer2txt(infer.contents.data(k))]
55 if infer.type.property==Real then
57 elseif infer.type.property==Complex then
62 txt=["|"+dims+"|"+tp+"|"+prop;txt]