Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Euphoria (programming language)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
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}
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Euphoria (programming language)
(section)
Add topic