EGL (programming language): Difference between revisions

Content deleted Content added
alphabetized
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 18:
An EGL Program part is a generatable logic part with one entry point. Each Program part contains a main() function, which represents the logic that runs at program start up. A program can include other functions and can access functions that are outside of the program. The function main() can invoke those other functions. Program functions are composed of a set of EGL statements, variables, and constants.
 
<sourcesyntaxhighlight lang="pascal" line highlight="5">
Program HelloWorld
 
Line 33:
 
end
</syntaxhighlight>
</source>
 
=== Record ===
Line 39:
An EGL Record part defines a set of data elements. In this example, a record with the name '''''CustomerRecord''''' is defined with 6 fields.
 
<sourcesyntaxhighlight lang="pascal">
Record CustomerRecord type BasicRecord
customerNumber INT;
Line 48:
customerBalance MONEY;
end
</syntaxhighlight>
</source>
 
EGL has a specialized type of record called '''''SQLRecord''''' that is used to exchange data with a relational database.
 
<sourcesyntaxhighlight lang="text">
record Employee type sqlRecord { tableNames =[["Employee"]], keyItems =[EMPNO]}
EMPNUMBER string{ column = "EMPNO", maxLen = 6};
Line 63:
end
 
</syntaxhighlight>
</source>
 
* In this example, the record '''''Employee''''' is bound to a table (or view) named '''''Employee'''''.
Line 71:
An EGL Service part contains public functions meant to be accessed from other applications or systems. In this example, a service with two functions is defined.
 
<sourcesyntaxhighlight lang="pascal" line highlight="1,5,11">
package com.mycompany.services;
 
Line 92:
 
end
</syntaxhighlight>
</source>
 
* In EGL, code is organized in packages (like [[Java (programming language)]])
Line 102:
The main component of a Rich UI application is a Rich UI handler part. These parts are generated into JavaScript.
 
<sourcesyntaxhighlight lang="javascript" line highlight="8">
package com.mycompany.ui;
 
Line 130:
end
</syntaxhighlight>
</source>
 
== Web 2.0 with EGL ==