Main Features Download Documentation Resources

Declare Statement

About

There are two sections used to create the syntax for Declare Statements. These define the syntax of the list of variable names (being declared) and the syntax of the declaration itself.

Java Example
[Declare Name]
Separator = ,{space}
Text = {name} | ~array
= {name} = new {Type}[{Size}] | array
[Declare]
Text = {Type} {Variables}; | ~array
= {Type}[] {Variables}; | array

Declare Name Section

About

This section is used to generate a list of variable names that will be used, later, in the [Declare] section.

Separator Key

The Separator defines the text that will be inserted between the list of variable names.

Fields
None
Flags
None

Text Key

The text key is used to generate the syntax of the each item in the list. The {size} variable contains a valid value if the Declare Statement is an array. Use the 'array' flag to use the proper syntax.

Fields Contents
{type} The variable's data type
{name} Name of the variable.
{size} Size of the array

The first and last flags can be used if the syntax differs for the first or last items in the list.

Flags When True
array The declaration is an array
first The variable is the first item in the list.
last The variable is the last item in the list.

Declare Section

About

The Declare Section is used to create the syntax for a Declare Statement.

Text Key

The text key is used to generate the syntax of the each item in the list. The {size} variable contains a valid value if the Declare Statement is an array. Use the 'array' flag to use the proper syntax.

Fields Contents
{variables} The names of the variables - generated by the Declare Name section.
{size} Size of the array. Only valid the declaration is an array.
{type} Name of the data type

The first and last flags can be used if the syntax differs for the first or last items in the list.

Flags When True
array The declaration is an array
first The declare is the first item in the block.
last The declare is the last item in the block.

Name Mode Key

This optional key is either set to singular or combined (default). If set to 'Singular' a Declare Statement will be generated for each name individually. In this case, the {Name} attribute, for the Text Key, is populated rather than {Variables}.

Pascal Example
[Declare]
Name Mode Singular  
Text SetLength({Name}, {Size}); | array