Wait ,<br><br>You have defined MATRIX_OF_DOUBLE_DATATYPE and MATRIX_OF_COMPLEX_DATATYPE in stackTypeVariable.h which are used for calling F77 code,<br><br>----------------------------------------------------------------<br>
#define MATRIX_OF_DOUBLE_DATATYPE "d"<br>#define MATRIX_OF_COMPLEX_DATATYPE "z"<br>#define MATRIX_OF_INTEGER_DATATYPE "i"<br>#define MATRIX_OF_RATIONAL_DATATYPE "r"<br>----------------------------------------------------------------<br>
<br>and then define sci_matrix , sci_poly .. in stack-c.h which are used for scilab internal,<br><br>----------------------------------------------------------<br>typedef enum {<br>  sci_matrix = 1 ,<br>  sci_poly = 2 ,<br>
  sci_boolean = 4 ,<br> ..<br>--------------------------------------------------------<br><br>And then I find statement in function overloadtype which is called by getrhsvar, here all numeric type (double,integer,rational  and complex)  are  maped  to  sci_matrix <br>
-------------------------------------------------<br>  case 'd' :  case 'i' :  case 'r' :  case 'z' :   /* numeric */<br>    ityp=sci_matrix;<br> -------------------------------------------------------------<br>
<br><br>Finally, in mexlib.c you use DOUBLEMATRIX  to represent sci_matrix.<br><br>----------------------------------------------------<br>#define DOUBLEMATRIX sci_matrix<br>------------------------------------------------------<br>
<br>So DOUBLEMATRIX becomes union of {DOUBLE MATRIX,COMPLEX MATRIX, INTEGER MATRIX...}<br>.<br><br>I think DOUBLEMATRIX defined in mexlib.c cause confusion and the second row in  table of 'data type nameing' in  ScilabWiki page, <br>
<a href="http://wiki.scilab.org/Localization_in_English_-_Standard_messages"><br>http://wiki.scilab.org/Localization_in_English_-_Standard_messages</a><br><br>should be changed to<br><br>constant :   sci_matrix : -->a generic numeric type or<br>
union of  MATRIX_OF_DOUBLE_DATATYPE,                      MATRIX_OF_COMPLEX_DATATYPE,<br>MATRIX_OF_INTEGER_DATATYPE<br> MATRIX_OF_RATIONAL_DATATYPE<br><br>, sci_matrix is not just MATRIX_OF_DOUBLE_DATATYPE.<br><br><br>I think change MATRIX_OF_DOUBLE_DATATYPE to 
MATRIX_OF_REAL_OR_COMPLEX<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">_DATATYPE will cause trouble, because  MATRIX_OF_DOUBLE_DATATYPE is used heavily in calling F77 code.</blockquote>
<div><br>sci_matrix  may  has a generic  name  'MATRIX_OF_NUMERIC_DATATYPE'  and let MATRIX_OF_DOUBLE_DATATYPE to a represent (double precision ) real matrix  just like its role in F77 code. </div><div><br>YungLee<br>
</div><br>
<br><br><div class="gmail_quote">2008/5/27 Sylvestre Ledru <<a href="mailto:sylvestre.ledru@inria.fr">sylvestre.ledru@inria.fr</a>>:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hmmm, after a quick look with Vincent C. (who is also on this mailing<br>
list), we realize that, yes, 'MATRIX_OF_DOUBLE_DATATYPE' is badly<br>
choose name in the source. It is causing confusion in the code.<br>
We are going to rename it to something like<br>
MATRIX_OF_REAL_OR_COMPLEX_DATATYPE<br>
Any comments on this?<br>
<div class="Ih2E3d"><br>
> To avoid mistake, use 'a real' if it really need  a real, 'real<br>
> matrix' if we need a real matrix or 'real or complex matrix' if we<br>
> need a  generic data.<br>
</div>Yep, we are reading all messages (you can imagine how sexy it is) and<br>
changing thme.<br>
<font color="#888888"><br>
Sylvestre<br>
</font><br>
PS: I c/c the dev mailing list since it is border-line.<br>
<br>
Le mardi 27 mai 2008 à 20:08 +0800, Yung-Jang Lee a écrit :<br>
<div><div></div><div class="Wj3C7c">> If we ever trace the code, (for example GUI\sci_gateway\c<br>
> \sci_delmenu.c)<br>
><br>
> ------------------------------------------------------------------------------------------------------<br>
>       // Unset a Menu a Scilab Graphic Window<br>
>       if (VarType(1) != sci_matrix)<br>
>         {<br>
>           Scierror(999, _("%s: Wrong type for first input argument:<br>
> Double value expected.\n"),fname);<br>
>           return FALSE;<br>
>         }<br>
>       GetRhsVar(1, MATRIX_OF_DOUBLE_DATATYPE, &nbRow, &nbCol,<br>
> &stkAdr);<br>
> ------------------------------------------------------------------------------------------------------<br>
> 'Double value' always maps to 'MATRIX_OF_DOUBLE_DATATYPE' which means<br>
> 'real or complex matrix' in Scilab. (Memory representation of<br>
> variables or<br>
> <a href="http://wiki.scilab.org/Localization_in_English_-_Standard_messages" target="_blank">http://wiki.scilab.org/Localization_in_English_-_Standard_messages</a><br>
> ).<br>
><br>
> But if we follow the gui context then 'Double value' seems to  mean 'a<br>
> real' (I don't expect to read any complex value in GUI applications).<br>
><br>
> The use of 'Double value' causes trouble in interpretation of the<br>
> meaning, especially if coupled with the use of  'Single value' which<br>
> means 1x1 matrix.<br>
><br>
> To avoid mistake, use 'a real' if it really need  a real, 'real<br>
> matrix' if we need a real matrix or 'real or complex matrix' if we<br>
> need a  generic data.<br>
><br>
><br>
> YungLee<br>
><br>
> 2008/5/27 Shiqi Yu <<a href="mailto:shiqi.yu@gmail.com">shiqi.yu@gmail.com</a>>:<br>
>         I think they are all means a double float point real<br>
>         scalar(1x1 matrix), but we can't replace them with 'real or<br>
>         complex matrix'.<br>
>         First, if we use 'matrix', users will input a MxN (M,N>1)<br>
>         matrix.<br>
>         Second, I think they must be real and can't be complex.<br>
><br>
><br>
>         2008/5/27 Yung-Jang Lee <<a href="mailto:yjlee123@gmail.com">yjlee123@gmail.com</a>>:<br>
><br>
><br>
>                 Hi all,<br>
><br>
>                 In gui.pot , I found following different messages<br>
><br>
>                       'A double value expected',<br>
>                       'A double expected',<br>
>                       'Scalar value expected',<br>
>                       'A value expected',<br>
>                       'Single value expected'<br>
><br>
>                 and they all means 'A real or complex'.<br>
><br>
>                 I module gui, 'double value' means 'real or complex<br>
>                 matrix', 'single value' means '1x1 matrix' and 'A..'<br>
>                 also means  '1x1 matrix' . Follow this way,   we have<br>
><br>
>                 'A double vaule'  == 'Single value'  == 'A value'.<br>
><br>
>                 I think this induce unnecessary mistake. It is better<br>
>                 to replace 'double value'  to 'real or complex matrix'<br>
>                 or just 'matrix'  in gui module.<br>
><br>
>                 YungLee<br>
><br>
><br>
><br>
><br>
>         --<br>
>         Shiqi Yu<br>
>         Shenzhen Institute of Advanced Technology,<br>
>         Chinese Academy of Sciences.<br>
>         Homepage: <a href="http://yushiqi.cn" target="_blank">http://yushiqi.cn</a><br>
><br>
<br>
</div></div></blockquote></div><br>