Euphoria (programming Language) - Data Types

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. Euphoria dynamically changes between integer and floating point representation according to the current value.
sequence
A 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 required 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 . Elements inside embedded sequences are referenced by additional bracked index values, thus X 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 -1073741824 to 1073741823 (-2^30 to 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 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}

Read more about this topic:  Euphoria (programming Language)

Famous quotes containing the words data and/or types:

    Mental health data from the 1950’s on middle-aged women showed them to be a particularly distressed group, vulnerable to depression and feelings of uselessness. This isn’t surprising. If society tells you that your main role is to be attractive to men and you are getting crow’s feet, and to be a mother to children and yours are leaving home, no wonder you are distressed.
    Grace Baruch (20th century)

    ... there are two types of happiness and I have chosen that of the murderers. For I am happy. There was a time when I thought I had reached the limit of distress. Beyond that limit, there is a sterile and magnificent happiness.
    Albert Camus (1913–1960)