05 May 2016
Additional files of RCML programs are included as follows: each file to be included is written from a new line. Include keyword must be placed in the beginning followed by a path to the file to be included in double quotes through the separating character (for example, space character).
include “function.rcml” include “C:/robot/robot.rcml” include “../libs/robot.rcml”
The path to the file to be included can be absolute or relative. In case of a relative path, the compiler first calculates the absolute path to the file relative to the absolute path to the file, where this inclusion structure is found. If the file is not found by the resulting path, the compiler calculates the absolute path relative to each variant of the path from path parameter of lib_search_paths section in config.ini configuration file in the order in which these paths have been specified in the configuration file.
This path parameter from lib_search_paths section of the configuration file is called “default search path”. The syntax for specifying default search paths is as follows:
[lib_search_paths] path = path_1 path = path_2
The order of inclusion of additional files with the code is the same in which they have been listed in the original rcml file.
The absolute path is calculated for each included file, and files included again with the same absolute path will not be included in the program.
You should understand a mechanism to include additional files in the program. This is analogous to the fact that instead of include structure, the text of the included file is placed in its entirety. The syntax of each file included is checked before inclusion, and the program is compiled taking into account all calculations and optimization only after preparation of the full text of the program considering all the included files.