[Scilab-users] Confusion about types (typeof vs. Variabe Browser)
Federico Miyara
fmiyara at fceia.unr.edu.ar
Wed Dec 4 02:07:17 CET 2019
Dear all,
Regarding the question I've sent a few days earlier (see below), I think
the Variable Browser in some cases may be creating confusion between
variable types and number formats
For instance,
a = 1.22
creates a variable of type "constant", while its format is "double".
Regards,
Federico Miyara
On 29/11/2019 02:57, Federico Miyara wrote:
>
> Dear all,
>
> I'm trying to elucidate some details regarding types. The most basic
> type, corresponding to real or complex decimal numbers (or vectors,
> matrices and hypermatrices with this kind of components) is called
> "constant" by the function typeof (and so listed in the documentation).
>
> However, the variable browser lists them as "double".
>
> This is somewhat confusing. It seems that "double" refers to the way
> each individual component is encoded while constant may refer to the
> fact that any array containing doubles is o type constant.
>
> In the case of integers, for instance we have int64 as reported by
> typeof, but in the Variable Browser it is listed a bit more in full as
> "Integer 64". While this is also slightly inconsistent, it is not to
> complain very much about.
>
> In the case of rationals, typeof returns "rational" while the Variable
> Browser callsit "r (Tlist)"
>
> Cell array type is called "ce" by typeof but "Cell" in the Variabe Browser
>
> User-defined types in tlists and mlists are designed by the
> user-defined type name by typeof, while the variable browser adds
> "(Tlist)" or "(Mlist)"
>
> Functions, libraries and impliit lists such as $ are not listed in the
> variable bowser but are correctly reported by typeof
>
> I wonder whether there is a reason for all this or it is actually an
> issue that could be fixed in a future versions.
>
> Thank you
>
> Regards,
>
> Federico Miyara
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20191203/42b6a860/attachment.htm>
More information about the users
mailing list