AMT Help Files

Implementation

Within the "implementation" folder, you can view and edit the code for the class definition that you opened. In this folder, each code section is represented by a subfolder. The left and right panes are synchronized automatically, which means that the selected subfolder always represents the code section in which the cursor is positioned. Class definitions contain the following code sections:

When you right-click, a shortcut menu is displayed with options to customize the view, display additional information, or perform certain actions on the code.

By setting the drop-down menu options "Show line number" and "Show revision," additional information may be displayed before each code line. For "Show revision," several options are provided. When the option "Revision" or "All" is selected, five asterisks (*****) are shown before each new code line. Only after the current revision is checked in are these asterisks replaced by the new revision number.

If an item name is selected, the shortcut menu also displays additional information for that item. When you type the name of an object or item followed by a dot (.), the available properties and functions are displayed. This makes it easier to complete the code. Selecting an option in the shortcut menu may display additional information in a hint box.

The LION syntax itself is case-insensitive. This does not apply to literals, including any type of end-user input, or to system items that store an application-specific name or property (for example, SI-CURRFORM, SI-REPNAME, SI-FOCUSEDFIELD, and so on).

Definitions

In this section, you declare the class variables.

begin_definitions

type
  CLASSES_REG : class
    public
    VARALPHA25      : alpha 25
    VARALPHA50      : alpha 50
    VARALPHA100     : alpha 100
    VARSTRING       : string
    VARREALSTRING   : realstring
    VARINTEGER      : integer
    VARBOOLEAN      : boolean
    VARNUMERIC      : numeric 12
    VARFINFANCIAL   : financial 18.2
    VARSIGNED       : signed 10.4
    VARLISTALPHA8   : list (alpha 8)
    VARLISTCLASS    : list (CLASSNAME)
  end_class

end_definitions

The definition section begins with the keyword "BEGIN_DEFINITIONS" and ends with "END_DEFINITIONS". Between these keywords, classes are defined below the keyword "TYPE".

Next, the class name must be defined as a class. This name must be the same as the class definition name you entered when creating the class definition and must be at least three characters long.
This is followed by the access modifier. Currently, "PUBLIC" and "PRIVATE" are implemented.

After these prefilled items, you can define your variables.
The following LION types are allowed:

After the variables, the class definition is closed by the End_Class keyword and the END_DEFINITIONS keyword.

* As of AMT 14, it is possible to use nested classes. For more information about nested classes, see the Nested Classes section on the Usage of Classes page.

# Structures in classes are supported from AMT 78 onward to ease migration projects. However, it is recommended to use nested classes instead of structures in classes. Structures in classes cannot be used in calls to or from web services. In addition, when using the <Class>.ToJson or <Class>.ToXml functions on a class that contains a structure, the items in the structure are serialized to a JSON string or XML string, but the structure itself is not.

Routines

The routine section contains all routines belonging to the class. Each routine contains a specific piece of code. In an object, a routine is called when the specific code within it must be executed. The code of a class routine always starts with BEGIN_ROUTINE and ends with END_ROUTINE. However, if the command EXIT is encountered while executing the code of a routine, that routine exits immediately. See Class ROUTINE.

Contents