Re: [docs and wiki] How many data-types do we emphasize?
- Posted by _tom (admin) Jan 31, 2021
- 927 views
[quote irv]
┌────────┐ ┌─┤ object ├─┐ Five built-in Types │ └────────┘ │ │ │ number sequence │ │ integer string └────────────┬───────────┘ │ type A user defined 'type' further limits permitted values
be well
_tom
Irv has captured the ''essence'' of what a data-type is; compared to:
wikipedia: "''This data type defines the operations that can be done on the data, the meaning of the data, and the way values of that type can be stored.'''
A data-type "restricts the permitted values of a variable."
(I know this is true because I wrote this down a while back...)
The conventional view of operations, meaning, and storage do not apply.
An expression may compute to a real value; but you can't assign that value to an integer. Euphoria never constrained how you write an expression, what the result was, and what you can do with your result--only you better assign an integer to an integer variable.
A ""data-type"" in Euphoria/Phix is a different animal from a conventional beast.
be well
_tom