Insertion marks

Insertion marks serve for inserting a code in the case of follow-up generation to the denoted place within the generated code and vice versa, (to generate a code to be used later). Handling the insertion marks is controlled by means of the %THREAD command with subsequent syntax, where <id> is an identifier denoting the thread:

%THREAD <id> CREATE Creates a new insertion.
%THREAD <id> CREATE_NO_DUPL Creates a new insertion, in which duplicate lines will be removed automatically.
%THREAD <id> INSERT Inserts the insert to the point of current code generating action, where each insert can be inserted to a single point.
%THREAD <id> SELECT Selects the insert as a target file, into which the code is generated (similarly as with the section switching commands, see Sections topic; unlike the section switching one, this command will be subject to conditional translation (switching will be selected only if generating by conditional translation has not been disabled).
%THREAD <id> UNSELECT Recovers the previous target file into which the code is generated.
%THREAD <id> DESTROY Releases the insert from the memory, the insert will remain inaccessible, when a new insert with the same identification can be created.

The parameters of the %THREAD command can be combined arbitrarily (but only meaningfully), the processing takes place from the left to the right. For instance:

 %THREAD thrd CREATE INSERT   
 %THREAD thrd UNSELECT DESTROY