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

Pinçon Bruno bruno.pincon at univ-lorraine.fr
Tue Dec 10 16:49:03 CET 2019


Le 10/12/2019 à 10:47, Stéphane Mottelet a écrit :
>
> 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...
>

    Looks good Stephane !

  Bruno


-- 

Non à l'augmentation des frais d'inscription (Fac, IUT, écoles...) 
<http://qsfsp.ovh/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191210/d5458e4a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: serveimage.png
Type: image/png
Size: 6113 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20191210/d5458e4a/attachment.png>


More information about the users mailing list