Skip to main content
Version: 7.0

@ statement

The @ statement uses metacode.

Syntax

@name(param1, ..., paramN)
[{
statement1
...
statementM
}];

Description

The @ statement generates code obtained from the metacode with the name name, replacing metacode parameters with the values of its own parameters and executing the special ## and ### operations.

The block in curly braces contains the statement's generated code: it is generated and maintained by the development environment so that navigation and code analysis work with the resulting code. During compilation the platform ignores the content of the block and always generates the code anew from the metacode declaration, so the block must not be edited by hand — changes are made to the metacode declaration or to the statement parameters.

Parameters

  • name

    The name of the metacode used. Composite ID.

  • param1, ..., paramN

    The list of statement parameters that will be substituted for the parameters of the metacode used. The parameters can be a composite ID, a class ID, a literal or the empty parameter when nothing is passed as a parameter.

  • statement1 ... statementM

    The statement's generated code — a sequence of statements generated by the development environment.

Examples

CLASS Book;
@objectProperties(book, INTEGER, 'Book');

CLASS Flower;
@objectProperties(flower, BPSTRING[100], ); // if the parameter is not passed, then it will be empty

CLASS Table;
@objectProperties(table, NUMERIC[14,2]);