Euphoria (programming language)
Euphoria is an interpreted programming language that was developed by Robert Craig of Rapid Deployment software. The first version of Euphoria was released in 1993 for the Atari ST, the latest version 4.0.5 ( Release 25 January 2013) are available for Windows, Linux, FreeBSD, and MS -DOS. Since version 3.0.0 Euphoria is released under an open source license.
The objective in the development of Euphoria was to develop a very easy to learn, but powerful command language, which should keep up the speed of compiled languages. This goal has now been achieved. The manufacturer also offers a tool that can translate to C and then compile Euphoria code. Euphoria comes with a simple database.
The website also Contributed by many users collection of more than 1600 programs is the source code for a variety of application areas.
Example
Here is a code example from the manual:
Sequence list, sorted_list function merge_sort (sequence x) integer n, mid merged sequence, a, b n = length (x ) if n = 0 or n = 1 then return x - trivial case end if mid = floor ( n / 2) a = merge_sort ( x [ 1 mid. ] ) - sorts the first half of x b = merge_sort (x [mid 1 .. n]) - sorts the second half of x merged = {} while length ( a) > 0 and length ( b ) > 0 do if compare ( a, b) < 0 then merged = append (merged, a) a = a [ 2. length (a)] else merged = append (merged, b ) b = b [ 2. length (b)] end if end while return merged & a & b end function procedure print_sorted_list () list = {9, 10, 3, 1, 4, 5, 8, 7, 6, 2} sorted_list = merge_sort (list) ? sorted_list end procedure print_sorted_list () The program then outputs
{1, 2, 3, 4, 5, 6, 7, 8, 9, 10 } from.
Central data type of Euphoria are called sequences ( sequences). Here is an example:
{2, 3, 5, 7, 11, 13, 17, 19} {1, 2, { 3, 3, 3}, 4, { 5, 6} { }} { { "jon ", " smith "}, 52389, 97.25 } { } { x 6, 9, y * w 2, sin ( 0.5) } Sequences can be arbitrarily nested into each other. Thus, for example, trees can be very easy pose.