1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 // Copyright (C) DIGITEO - 2010 - Allan CORNET
5 // Copyright (C) 2012 - 2016 - Scilab Enterprises
7 // This file is hereby licensed under the terms of the GNU GPL v2.0,
8 // pursuant to article 5.3.4 of the CeCILL v.2.1.
9 // This file was originally licensed under the terms of the CeCILL v2.1,
10 // and continues to be available under such terms.
11 // For more information, see the COPYING file which you should have received
12 // along with this program.
15 function [%val, %ierr] = evstr(%str)
22 // matrix of character strings
45 %t1 = strcat(%str, ",", "c")+";"
46 %t1(1) = "%val=[" + %t1(1);
47 %t1($) = part(%t1($), 1:length(%t1($)) - 1)+";";
50 %ierr = execstr(%t1, "errcatch");
58 %nstr = prod(size(%sexp));
62 [%w, %ierr] = evstr(%sexp(%k_));
69 [%val, %ierr] = evstr(%str(1));
72 %(%k_) = evstr(%sexp(%k_));
78 // real or complex constant matrix
82 error(msprintf(gettext("%s: Wrong type for input argument #%d: Real or Complex matrix, Matrix of character strings or list expected.\n"), "evstr", 1));
84 if exists("%val", "local") == 0 then
85 error(msprintf(gettext("%s: Given expression has no value.\n"), "evstr"));