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

Content deleted Content added
WikiCleanerBot (talk | contribs)
m v2.02b - Bot T17 - WP:WCW project (Internal link inside external link)
m change source to syntaxhighlight
Line 30:
Perhaps a more flavorful example would take a list of strings, sort them into order, and then return that as a result instead.
 
<sourcesyntaxhighlight lang="ecl">
// 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)
</syntaxhighlight>
</source>
 
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?
<sourcesyntaxhighlight lang="ecl">
SD := SORT(D,Value);
</syntaxhighlight>
</source>
SD is a D that has been sorted by ‘Value’
 
What is a D?
<sourcesyntaxhighlight lang="ecl">
D := DATASET([{'ECL'},{'Declarative'},{'Data'},{'Centric'},{'Programming'},{'Language'}],{STRING Value;});
</syntaxhighlight>
</source>
D is a dataset with one column labeled ‘Value’ and containing the following list of data.