Contents
Localization in English - Standard messages
Data type naming
Data type in Scilab code (see function typeof) |
Data type in stack-c.h |
Data type in stackTypeVariable.h |
Type name for messages |
1x1 value |
1xn value |
nx1 value |
mxn value |
type() |
constant |
sci_matrix |
MATRIX_OF_DOUBLE_DATATYPE |
Real or complex array /matrix |
A real or complex |
Real or Complex row vector |
Real or Complex column vector |
Real or Complex matrix |
1 |
polynomial |
sci_poly |
MATRIX_OF_POLYNOMIAL_DATATYPE |
Polynomial array/matrix |
A polynom |
Real or complex row vector of polynomials |
Real or complex column vector of polynomials |
Real of complex matrix of polynomials |
2 |
boolean |
sci_boolean |
MATRIX_OF_BOOLEAN_DATATYPE |
Boolean array/matrix |
A |
Boolean row vector |
Boolean column vector |
Boolean matrix |
4 |
sparse |
sci_sparse |
SPARSE_MATRIX_DATATYPE |
Sparse real or complex array /matrix |
??? |
Sparse real or complex row vector |
Sparse real or complex column vector |
Sparse real or complex matrix |
5 |
boolean sparse |
sci_boolean_sparse |
??? |
Boolean sparse array /matrix |
??? |
Sparse boolean row vector |
Sparse boolean coliumn vector |
Sparse boolean matrix |
6 |
Matlab sparse |
sci_matlab_sparse |
??? |
Matlab sparse real or complex array /matrix |
??? |
Matlab Sparse real or complex row vector |
Matlab Sparse real or complex column vector |
Matlab Sparse matrix |
7 |
int(8|16|32) |
sci_ints |
MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE |
(8|16|32)-bit integerarray /matrix |
A (8|16|32)-bit integer |
(8|16|32)-bit integer row vector |
(8|16|32)-bit integer column vector |
(8|16|32)-bit integer matrix |
8 |
uint(8|16|32) |
sci_ints |
MATRIX_OF_VARIABLE_SIZE_INTEGER_DATATYPE |
(8|16|32)-bit unsigned integerarray /matrix |
A (8|16|32)-bit unsigned integer |
(8|16|32)-bit unsigned integer row vector |
(8|16|32)-bit unsigned integer column vector |
(8|16|32)-bit unsigned integer matrix |
8 |
handle |
sci_handles |
GRAPHICAL_HANDLE_DATATYPE |
Graphic handle array |
A graphic handle |
Graphic handle row array |
Graphic handle column array |
Graphic handle 2D array |
9 |
string |
sci_strings |
STRING_DATATYPE/MATRIX_OF_STRING_DATATYPE |
Character string array |
A string |
Row array of strings |
Column array of strings |
2D array of strings |
10 |
function (not-compiled) |
sci_u_function |
-- DOES NOT EXIST -- |
Uncompiled function |
??? |
??? |
??? |
??? |
11 |
function (compiled) |
sci_c_function |
-- DOES NOT EXIST -- |
Function |
??? |
??? |
??? |
??? |
13 |
library |
sci_lib |
-- DOES NOT EXIST -- |
Library?? |
??? |
??? |
??? |
??? |
14 |
list |
sci_list |
LIST_DATATYPE |
List |
1-item list |
N-item list |
N-item list |
-- DOES NOT EXIST -- |
15 |
tlist |
sci_tlist |
TYPED_LIST_DATATYPE |
Typed list |
??? |
??? |
??? |
??? |
16 |
rational |
-- DOES NOT EXIST -- |
-- DOES NOT EXIST -- |
Matrix of rational fractions or transfer function |
A rational fraction or a transfer function (depending on context) |
Row vector of rational fractions or Single output transfer function |
Column vector of rational fractions or Single input transfer function |
Matrix of rational fractions or MIMIO transfer function |
16/r |
state-space |
-- DOES NOT EXIST -- |
-- DOES NOT EXIST -- |
State-space representation |
A SISO state space system |
SIMO state space system |
MiSO state space system |
MiMO state space system |
16/lss |
mlist |
sci_mlist |
MATRIX_ORIENTED_TYPED_LIST_DATATYPE |
M-list |
??? |
??? |
??? |
??? |
17 |
hypermat |
-- DOES NOT EXIST -- |
-- DOES NOT EXIST -- |
N-dimensionnal array |
??? |
??? |
??? |
??? |
17/hm |
st |
-- DOES NOT EXIST -- |
-- DOES NOT EXIST -- |
Struct |
A 1-by-1 struct |
A 1-by-n struct |
A m-by-1 struct |
A m-by-n struct |
17/st |
ce |
-- DOES NOT EXIST -- |
-- DOES NOT EXIST -- |
Cell array |
A 1-by-1 cell |
A 1-by-n cell array |
A m-by-1 cell array |
A m-by-n cell array |
17/ce |
pointer |
sci_lufact_pointer |
EXTERNAL_DATATYPE |
Pointer on LU factorization |
??? |
??? |
??? |
??? |
??? |
Type/Size checking in Scilab code
1 if typeof(myvariable)<>"constant" then
2 error(sprintf(gettext("%s: Wrong type for input argument #%d: A Real or Complex expected.\n"), "myfunction", 1));
3 end
4 if size(myvariable, "*")<>1 then
5 error(sprintf(gettext("%s: Wrong type for input argument #%d: Real or Complex Scalar expected.\n"), "myfunction" 2,));
6 end
Type/Size checking in C code
1 if (VarType(1)!=sci_matrix)
2 {
3 Scierror(999, "%s: Wrong type for input argument #%d: Real or Complex Scalar expected.\n", "myfunction", 1);
4 return FALSE;
5 }
6 GetRhsVar(1, MATRIX_OF_DOUBLE_DATATYPE, &nbRow, &nbCol, &stkAdr);
7 if (nbRow*nbCol!=1)
8 {
9 Scierror(999, "%s: Wrong type for input argument #%d: Real or Complex Scalar expected.\n", "myfunction", 1);
10 return FALSE;
11 }
Error messages
Argument number checking
Wrong number of input argument(s) :
"%s: Wrong number of input argument(s).\n"
Wrong number of output argument(s) :
"%s: Wrong number of output argument(s).\n"
Wrong number of input argument(s) with information about the number of args :
"%s: Wrong number of input argument(s): %d expected.\n" with %d the number of arguments (of course the (s) depends %d)
"%s: Wrong number of input arguments: %d or %d expected.\n" with %d and %d the number of arguments (when only two number of argument is possible)
"%s: Wrong number of input arguments: %d to %d expected.\n" with %d and %d the number of arguments (when more than two number of arg is possible)
"%s: Wrong number of input argument(s): At least %d expected.\n" with %d the minimum number of arguments
Wrong number of output argument(s) with information about the number of args :
"%s: Wrong number of output argument(s): %d expected.\n" with %d the number of arguments (of course the (s) depends %d)
Argument types checking
Discussion: The error messages depends on the way the types are organized (type hierarchy) and tested. The error messages below supposes that variables have a main type and then sub-types real/complex, dimensions, length,....)
If available, all the error message should start with a %s containing the name of the Scilab function
Checking main data type :
"%s: Wrong type for input argument #%d: String array expected.\n"
...
"%s: Wrong type for input argument #%d: Polynomial array expected.\n" 'Same with the position of the argument
"%s: Wrong type for input argument #%d: String array expected.\n"
"%s: Wrong type for input argument #%d: Polynomial array expected.\n"
"%s: Wrong type for input argument #%d: N-dimensionnal array expected.\n"
"%s: Wrong type for input argument #%d: function expected.\n"
"%s: Wrong type for input argument #%d: cell array expected.\n"
"%s: Wrong type for input argument #%d: struct array expected.\n"
"%s: Wrong type for input argument #%d: typed list expected.\n"
"%s: Wrong type for input argument #%d: rational fraction array expected.\n"
"%s: Wrong type for input argument #%d: transfer function expected.\n"
"%s: Wrong type for input argument #%d: %s data structure expected.\n"
"%s: Wrong type for input argument #%d: Linear state space or a transfer function expected.\n"
"%s: Wrong type for input argument #%d: Linear state space expected.\n"
"%s: Wrong type for input argument #%d: Transfer function expected.\n"
... Checking sizes: (avoid reference to type as far as possible)
"%s: Wrong size for input argument #%d: Graphic handle expected.\n"
"%s: Wrong size for input argument #%d: Scalar expected.\n" for numerical data
"%s: Wrong size for input argument #%d: Polynomial expected.\n"
"%s: Wrong size for input argument #%d: Empty matrix expected.\n"
"%s: Wrong size for input argument #%d: Row vector expected.\n"
"%s: Wrong size for input argument #%d: Column vector expected.\n"
"%s: Wrong size for input argument #%d: Vector expected.\n" orientation does not matter
"%s: Wrong size for input argument #%d: 1-by-n array expected.\n"
"%s: Wrong size for input argument #%d: m-by-1 array expected.\n"
"%s: Wrong size for input argument #%d: Square matrix expected.\n"
"%s: Wrong size for input argument #%d: %d-element list expected.\n"
"%s: Wrong size for input argument #%d: %d-by-%d array expected.\n"
"%s: Wrong size for input argument #%d: %d-by-%d matrix expected.\n"
"%s: Wrong size for input argument #%d: Square system expected.\n"
"%s: Wrong size for input argument #%d: Single input, single output system expected.\n"
"%s: Wrong number of dimensions for input argument #%d: %d expected.\n"
... Checking sub-types: (avoid reference to type and size as far as possible)
"%s: Input argument #%d must be real.\n"
"%s: Input argument #%d must be %d byte(s) integer.\n"
"%s: Input argument #%d must be a handle on a axes.\n"
"%s: Input argument #%d must be a handle on a figure.\n"
Argument value checking
Wrong values : '
"%s: Wrong value for input argument #%d: Must be in the interval [%s, %s].\n" the %s in [] should result in formating of boundary value numbers (integers floats,...)
"%s: Wrong values for input argument #%d: Finite elements expected.\n"
"%s: Wrong values for input argument #%d: '%s' expected .\n"
"%s: Wrong value for input argument #%d: Must be in the set {%s}.\n" ' the %s in {} should result in formating of the set of possible values (integers floats,strings...)
"%s: Wrong values for input argument #%d: Non-negative integers expected.\n"
"%s: Wrong values for input argument #%d: Elements must be in increasing order.\n"
"%s: Wrong values for input argument #%d: Elements must be in decreasing order.\n"
"%s: Wrong values for input argument #%d: Elements must be in strictly increasing order.\n"
"%s: Wrong values for input argument #%d: Elements must be in strictly decreasing order.\n"
"%s: Wrong values for input argument #%d: Elements must be integer valued.\n"
"%s: Wrong size for input argument #%d: Must be less than %d characters.\n" with %d the maximum number of characters
....
Inter-Arguments constraints checking
"%s: Incompatible input arguments #%d and #%d: Same row dimensions expected.\n"
"%s: Incompatible input arguments #%d and #%d: Same column dimensions expected.\n"
"%s: Incompatible input arguments #%d and #%d: Same sizes expected.\n"
"%s: Incompatible input arguments #%d and #%d: Same element number expected.\n"
Memory
Not enough memory :
"%s: No more memory.\n" with %s the name of the function where the error occurred
%s: No more memory %d requested, %d available\n"
"%s: Too small stack '%d requested, %d available'.\nStack size may be increased using the stacksize function\n"
Feature
We don't have the feature but this could be implemented in the future :
"%s: This feature has not been implemented.\n"
"%s: This feature has not been implemented: Variable translation of type %s.\n"
Variables
Cannot find the variable :
"%s: Undefined variable %s.\n" with %s the name of the variable
File/Dir
Impossible to open a file :
"%s: Cannot open file %s.\n" with %s the name of the file
Can not find the file :
"%s: The file %s does not exist.\n"
