Implementation
Within the folder "implementation", you can view and edit the code for the forms, reports or global routines that you have opened. In this folder, each code section is represented by a subfolder. The left and right pane are automatically synchronized, which means that the subfolder that is selected always represents the code section where the cursor is positioned.
Objects contain the following code sections:
When doing a right mouse click, a popup menu will display options to customize the view, display additional information or to perform certain actions on the code.
By setting the popdown menu options "Show line number" and "Show revision", extra information may (or may not) be displayed before each code line. For "Show revision", there are several options provided. When the option "Revision" (or "All") is selected, there will be shown five asterisks (*****) before every new code line. Only after checking in the current revision, these asterisks will be replaced with the new revision number.
If an item name is selected, this popup menu will also display additional information for this item. When typing the name of an object or item, followed by a dot(.) the available properties, functions etc. will popup. This way it will be easier to complete the code. Selecting an option in the popup menu may provide additional information in a hint box.
The LION syntax itself is case insensitive. Nevertheless, this does not concern literals (including any kind of end user input) or system items that store an application specific name or property (like SI-CURRFORM, SI-REPNAME, SI-FOCUSEDFIELD, etc).
Definitions
The definition section begins with the keyword "BEGIN_DEFINITIONS" and ends with the keyword "END_DEFINITIONS". Between these keywords, constants are defined below the keyword "CONST", variables below the keyword "VAR", retained variables below the keyword "RETAINED_VAR", boolean functions below the keyword "BOOLEANS" and shared layout definitions below the keyword "SHARED_LAYOUTS". It is also possible to group definitions as a structure.
See also BEGIN_DEFINITIONS...END_DEFINITIONS.
Display section
The display section contains the code that is first started within a form. The section begins with "DISPLAY_MAIN" and ends with "END_ROUTINE". This section does not apply to global routines and reports.
Process section
After sending the form, data processing continues within the process section. This section begins with "PROCESS_MAIN" and ends with "END_ROUTINE". This section does not apply to global routines and reports.
In most cases, values that are assigned through this section will be kept until the screen is transmitted. For any kind of database query this means that it will be closed after transmission. The same applies to files (in that case a <file id>.Close is performed automatically). Any printer output files will be flushed and closed in these instants (which is equal to a FREEOUTPUT execution). Only if session data or retained variables are concerned, changes will be kept after the screen transmission.
Main
This routine is run directly after start up of the object in which it is specified. This section applies to global routines and reports. The code for section begins with "ROUTINE Main" and ends with "END_ROUTINE".
Routines
The routine section contains all routines except the main routine, DISPLAY_MAIN or PROCESS_MAIN. Each routine contains a specific piece of code. In an object a routine is called if the specific code within that routine has to be executed. A routine always begins with BEGIN_ROUTINE and ends with END_ROUTINE . However, if the command "EXIT" is encountered while executing the code of a routine, that routine is quit immediately.
In most cases, values that are assigned through routines will be kept until the screen is transmitted. Only if session data or retained variables are concerned, changes will be kept also afterwards.