A public attribute allows an Identifier to be used from other modules, outside the form.
The Public attribute can be applied on most identifiers: Variables, Types, Libraries, Forms, Controls, Procedures, and more. Making an identifier public, that is an identifier that contains a public attribute, allows other modules to use the identifier.
To reduce dependencies between modules, ATEasy allows public identifiers to be used as follows:
A program can use public symbols defined in the System or System Drivers.
A System can use public symbols defined in System Drivers.
A Driver can use public symbols defined in System drivers (although this is not recommended).
Form Variable can be used to access public members of the form (controls, procedures, events, or variables)
When the ATEasy compiler searches for an identifier, ATEasy first searches for it in the module where it is being used, then ATEasy searches in modules to the right as shown here:
1. Program->2. System->3. System Drivers (Driver N, Driver N-1, ..., Driver1)
Note that all Identifiers defined in the module where the identifier is used are searched first.
For example, if an identifier is used in a System, ATEasy first looks in the System for all identifiers. Then ATEasy looks in the System Drivers, starting from the last to the first, for all public identifiers.
Public attributes can be changed from the Properties Window of the identifier.