Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
EGL (programming language)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Service === 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. <syntaxhighlight lang="pascal" line highlight="1,5,11"> package com.mycompany.services; service EmployeeService function getEmployees() returns(Employee[]) records Employee[0]; // define an empty array of records get records; // retrieve records from the database return (records); // return the records end function addEmployee(emp Employee in) returns (boolean) try add remp; return (true); onException (ex AnyException) return (false); end end end </syntaxhighlight> * In EGL, code is organized in packages (like [[Java (programming language)]]) * The first function, ''getEmployees'', returns an array of records populated from the records in a database. * The second function, ''addEmployee'' adds a new record to the database and returns a true or false depending on whether the record was added successfully.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)