ECL (data-centric programming language): Difference between revisions

Content deleted Content added
m Hello world: <source lang="ecl">
Line 27:
=== Hello world ===
ECL is to have succinct solutions to problems and sensible defaults. The "Hello World" program is characteristically short:
"Hello World".
Perhaps a more flavorful example would take a list of strings, sort them into order, and then return that as a result instead.
 
<source lang="ecl">
<pre>
// First declare a dataset with one column containing a list of strings
// Datasets can also be binary, CSV, XML or externally defined structures
Line 37:
SD := SORT(D,Value);
output(SD)
</presource>
 
The statements containing a <code>:=</code> are defined in ECL as attribute definitions. They do not denote an action; rather a definition of a term. Thus, logically, an ECL program can be read: "bottom to top"
Line 44:
 
What is an SD?
<source lang="ecl">
 
SD := SORT(D,Value);
</source>
 
SD is a D that has been sorted by ‘Value’
 
What is a D?
<source lang="ecl">
 
D := DATASET([{'ECL'},{'Declarative'},{'Data'},{'Centric'},{'Programming'},{'Language'}],{STRING Value;});
</source>
 
D is a dataset with one column labeled ‘Value’ and containing the following list of data.