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.
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>;
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>;
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>;
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>;
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>;
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>;
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>;
On describing a cycle, in the "Repeat" string after pressing the ENTER key the structure looks as follows:
Repeat
Until;
On describing a cycle, in the "For" string after pressing the SPACE key the structure looks as follows:
For
End For;
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;
On describing a cycle in the "While" string, after pressing the SPACE key the structure looks as follows:
While Do
End While;
On describing an operator in the "With " string, after pressing the SPACE key the structure looks as follows:
With : Do
End With;
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;
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;
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.