User Tools

Site Tools


Sidebar

Translations of this page:
en

Index

en:traffic:documentation:require

$REQUIRE <Filename>
$REQ

Includes a Timetable file with the file name <Filename>.

This functions as if the entire contents of the file <Filename> appear at the place where the $REQUIRE line appears.  There is no maximum limit to how many files can be included into another Timetable, but the number of nested include statements cannot exceed ten.  That is to say, if you include a file, it can contain an $INCLUDE / $REQUIRE as well and so on up to a depth of ten levels.

If you use relative path names, they will be evaluated from the path of the timetable file the $REQUIRE is in.

The difference against the $INCLUDE command: the files included with $INCLUDE will be included each time the same file name stays in an $INCLUDE command, files included with the $REQUIRE command will be included only once. If you have only $DEF commands in the included file, which define macros, then using $REQUIRE can assure, that the file will be included only once - the definitions are made at first time, after that it will be superflous to obey the file once more. In contratry, if you have movements in the include file, which behaviors are depending on the context they are included, then you will let to process the lines each time - you should use $INCLUDE . In the most normal cases (you include a file only once) both commands are identical.

This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.
More information
en/traffic/documentation/require.txt · Last modified: 2018/09/09 17:52 (external edit)