Automatic Substitutions

During unit/form creation, a user often has to enter similar structures (procedures, functions, cycles, and so on) in a macro body; in general, these structures consist of the language key phrases and different names. To reduce the code content, entered manually, the automatic structure substitution is provided in the Fore language. The automatic substitution is available in the following situations.

Automatic Substitution During Class Description

During a class description, in the "Class <Name>" string after pressing the SPACE key the structure looks as follows:

Class <Name>
    
End Class <Name>;

Or, after typing the colon symbol (:) the structure looks as follows:

Class <Name>:
    
End Class <Name>;

Automatic Substitution During Properties Description

During interface description, in the "Interface <Name>" string after pressing the ENTER or SPACE key the structure looks as follows:

Interface <Name>
    
End Interface <Name>;

Or, after typing the colon symbol (:) the structure looks as follows:

Interface <Name>:
    
End Interface <Name>;

Automatic Substitution During Description of Enumeration Types

During enumerated types description in the "Enum <Name>" string, after pressing the ENTER or SPACE key the structure looks as follows:

Enum <Name>
    
End Enum <Name>;

Automatic Substitution During Procedure Description

On describing procedures in the "Sub <Name>" string, after typing in ";" or "(" symbols or pressing the SPACE key, the structure looks as follows:

Sub <Name><Symbol>
Begin
    
End Sub <Name>;

Automatic Substitution During Function Description

On describing functions in the "Function <Name>" string, after typing in ":"  or "(" symbols or pressing the SPACE key, the structure looks as follows:

Function <Name><Name>:
Begin
    
End Function <Name>;

Automatic Substitution During Namespace Description

On describing namespaces in the "Namespace <Name>" string, after pressing the SPACE or ENTER key, the structure looks as follows:

Namespace <Name>
    
End Namespace <Name>;

Automatic Substitution During Properties Description

On describing properties in the "Property <Name>" string after typing in ":"  or "("  symbols the structure looks as follows:

Property <Name><Symbol>
    Get
    Begin
        
    End Get
    Set
    Begin
        
    End Set
End Property <Name>;

Automatic Substitution for the Repeat.. .Until Cycle

On describing a cycle, in the "Repeat" string after pressing the ENTER key the structure looks as follows:

Repeat
    
Until;

Automatic Substitution for the For... End For Cycle

On describing a cycle, in the "For" string after pressing the SPACE key the structure looks as follows:

For
    
End For;

Automatic Substitution for the For Each ... End For Cycle

On describing a cycle in the "For Each" string after pressing the SPACE key the structure looks as follows:

For Each In Do
    
End For;

Automatic Substitution for the While... End While Cycle

On describing a cycle in the "While" string, after pressing the SPACE key the structure looks as follows:

While Do
    
End While;

Automatic Substitution for the With... End With Operator

On describing an operator in the "With " string, after pressing the SPACE key the structure looks as follows:

WithDo
    
End With;

Automatic Substitution for the Select... End Select Cycle

On describing the Select...End Select structure in the "Select" string, after pressing the SPACE key, the structure looks as follows:

Select Case
    
End Select;

Automatic Substitution for If... End If

On describing the If... End If structure, in the "If " string, after pressing the SPACE key the structure looks as follows:

If Then
    
End If;

Automatic Substitution for Try... End Try

On describing the Try...End Try structure, in the "Try" string after pressing the SPACE or ENTER key the structure looks as follows:

Try
    
Finally
End Try;

The Fore language supports automatic replacement of all keywords of the language: the keywords are typed in lower case with first capital letter and are highlighted in blue by default.