Operators |
export_def — Insert arbitrary text into the export code of a procedure.
export_def( : : Position, Declaration : )
export_def allows to define code lines or text blocks that are written verbatim into the output file of a procedure or program that is exported.
The parameter Position controls the placement of the text given in Declaration. The following options are supported:
The text is inserted in the procedure at the actual place, i.e., inbetween the neighboring program lines.
The text is exported at the very beginning of the exported file.
The text is exported immediately before the procedure it is defined in.
The text is exported immediately after the procedure it is defined in.
The text is exported at the very end of the exported file.
In the program listing, export_def is not represented in normal operator syntax but marked by a special character sequence. The first character within the line is the export marker # that can be followed by a position marker as listed above. If entering an export definition in the full text editor, please note that there must not be any spaces before #.
For better readability, the export character sequence may be followed by one space character that is not interpreted as part of the export text. All additional spaces are added to the export.
For lines that are exported within the current procedure, the export gets the same indentation as the current program lines get. There is one exception: if the export text starts with # immediately after the export markers or the optional space, the export text will not be indented at all, e.g.:
for Index := 1 to 5 by 1 # #ifdef MY_SWITCH # int cnt = 100; * an optional code block # #endif endfor
is exported to:
proc (...) { ... for (...) { #ifdef MY_SWITCH int cnt = 100; // an optional block #endif } ... }
An export definition can be activated and deactivated as any normal operator. Deactivated export definitions are not exported.
Place where the export text is written.
List of values: 'after_procedure' , 'at_file_begin' , 'at_file_end' , 'before_procedure' , 'in_place'
Text that is exported.
export_def is never executed.
Foundation
Operators |