Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Euphoria (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Data types== Euphoria has two basic data types: :Atom β A number, implemented as a 31-bit signed [[integer]] or a 64-bit [[IEEE floating-point standard|IEEE floating-point]]. Euphoria dynamically changes between integer and floating point representation according to the current value. :Sequence β A [[Array data type|vector]] (array) with zero or more elements. Each element may be an ''atom'' or another ''sequence''. The number of elements in a sequence is not fixed (i.e., the size of the vector/array does not have to be declared). The program may add or remove elements as needed during run-time. Memory allocation-deallocation is automatically handled by reference counting. Individual elements are referenced using an index value enclosed in square brackets. The first element in a sequence has an index of one [1]. Elements inside embedded sequences are referenced by additional bracked index values, thus X[3][2] refers to the second element contained in the sequence that is the third element of X. Each element of a sequence is an ''object'' type (see below). Euphoria has two additional data types predefined: :Integer β An ''atom'', restricted to 31-bit signed [[integer]] values in the range {{val|-1073741824}} to {{val|1073741823}} ({{tmath|-2^{30} }} to {{tmath|2^{30}-1}}). ''Integer'' data types are more efficient than the ''atom'' data types, but cannot contain the same range of values. Characters are stored as integers, e.g., coding [[ASCII]]-'A' is exactly the same as coding 65. :Object β A generic datatype which may contain any of the above (i.e., ''atom'', ''sequence'' or ''integer'') and which may be changed to another type during run-time. There is no character [[String (computer science)|string]] data type. Strings are represented by a ''sequence'' of ''integer'' values. However, because literal strings are so commonly used in programming, Euphoria interprets double-quote enclosed characters as a sequence of integers. Thus "ABC" is seen as if the coder had written: {'A', 'B', 'C'} which is the same as: {65, 66, 67}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)