[Scilab-users] Confusion about types (typeof vs. Variabe Browser)

Stéphane Mottelet stephane.mottelet at utc.fr
Tue Dec 10 10:47:51 CET 2019


After thinking about it and after looking to other softwares, my 
proposition would be to concentrate on the set theoritic name + use 
parenthesis for details of storage

typeof(x)=="constant" && isreal(x)==%t && issparse(x)=%f : Real

typeof(x)=="constant" && isreal(x)==%f && issparse(x)=%f : Complex

typeof(x)=="constant" && isreal(x)==%t && issparse(x)=%t : Real (sparse)

typeof(x)=="constant" && isreal(x)==%f && issparse(x)=%t : Complex (sparse)

typeof(x)=="boolean" && issparse(x)=%f : Boolean

typeof(x)=="boolean" && issparse(x)=%t : Boolean (sparse)

For integers, since their use is rather specific to more advanced users, 
i suggest to display the storage type to differentiate them

type(x)==8 && inttype(x)==1 : Integer (int8)

type(x)==8 && inttype(x)==11 : Integer (uint8)

and so on...

However, I don't understand why we should consider Scilab users as less 
aware (or less concerned by) of the reality of storage types. When you 
consider the big audience of Matlab and see that developpers didn't 
waste time like we do here. They just use "double", litteral integer 
types (int8,...). Moreover they didn't even have to make translations....

S.

Le 09/12/2019 à 09:44, Stéphane Mottelet a écrit :
>
> Hello all,
>
> Le 06/12/2019 à 23:37, Samuel Gougeon a écrit :
>> Le 06/12/2019 à 23:23, Federico Miyara a écrit :
>>>
>>> .../...
>>> By the way, if constant were changed to double (or to number or 
>>> num.ber --I don't get the dot...
>>
>> As in 3.14, contrarily to 123
>>
>
> If "double" is not to be used for reasons that I still don't 
> understand, why don't we use "Real" instead of "Number" for x such 
> that typeof(x)==constant and isreal(x)==%t ? This would be consistent 
> with "complex" when typeof(x)==constant and isreal(x)==f. Moreover, 
> this would be even set-theory compliant, i.e. use the name of the 
> smallest set corresponding to storage type.
>
>
>>
>>> --), then as this might cause some backward compatibility, consider 
>>> taking the oportunity also to replace "ce" by "cell", and "st" by 
>>> "struct", 
>>
>> Definitely, or even with their possible translation in locales, as 
>> for other main native types.
>>
>>
>>
>>
>> _______________________________________________
>> users mailing list
>> users at lists.scilab.org
>> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
> -- 
> Stéphane Mottelet
> Ingénieur de recherche
> EA 4297 Transformations Intégrées de la Matière Renouvelable
> Département Génie des Procédés Industriels
> Sorbonne Universités - Université de Technologie de Compiègne
> CS 60319, 60203 Compiègne cedex
> Tel : +33(0)344234688
> http://www.utc.fr/~mottelet
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

-- 
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191210/44647724/attachment.htm>


More information about the users mailing list