Scope Resolution Operator ('.')

The Scope Resolution Operator names an identifier defined in a module, form, control, library, structure variable or type, or enumerated data type.

Syntax

VariableOrType.MemberName

Where

 

Syntax Component

Description

VariableOrType

Can be any identifier (variable or type that have members). That includes:  Module name: Program or Systems or Driver Name. Structure, Enum, Library, Class, Form Variable, and Control.

MemberName

Public member of the VariableOrType. It can be a form or a module procedure, IO table, object or complex type variable. Structure field, enum constant. Library class, procedure, variable or event. Class method, property, or event. Form control, variable or procedure.

Comments

When you use an identifier name (such as a variable or a procedure) that is defined in two or more modules, ATEasy searches and uses the first identifier name found. To override this behavior and to direct the compiler to use the identifier from the module or library you want, you can use the Scope Resolution Operator ('.').

When referring to identifiers from different modules they must be defined as Public and in a module that can be used from the module you are using. For more information on public identifiers, see Public Attribute.

The Scope Resolution Operator is different from the Member Operator. The first is used to direct the compiler to use an identifier in a different scope; the second is used to access members of an object or a structure or enum. See also Member Operator.

Example

print Driver1.nVariable

System.OnInit()

print enumATestStatus.Fail

print Internal.enumATestStatus.Fail

print Excel.enumATestStatus.Fail

print frm.lblName.Text