INCLUDE
Description
As of version 4.50 B169:
Include:
Syntax:
INCLUDE("INCLUDE_SUB_SCRIPT");
INCLUDE can be used to include the code of an Engine Script Document in another Engine Script.
Nested includes are also possible.
Local DEFFN functions should be included at the beginning.
If a local DEFFN function is to be called in an included Engine Script , this local DEFFN function must have been defined before it is called. It is not possible to define this local DEFFN function in an Engine Script that is included later.
However, INCLUDE must not break or split syntactic constructs!
Therefore, a construct like the following is not possible:
PRC:
IF(Bool)
{
INCLUDE("INCLUDE1");
@LogReport("DANACH");
PRC INCLUDE1:
@LogReport(Bool);
}
The following, however, is possible, for example:
PRC:
INCLUDE("INCLUDE1");
CALL:TestFun(&Parameter);
@LogReport(Parameter);
PRC INCLUDE1:
DEFFN:TestFun(*Parameter)
{
Parameter:="Text";
}
or
PRC:
IF(Bool)
{
INCLUDE("INCLUDE1");
}
ELSE
{
INCLUDE("INCLUDE2");
}
PRC INCLUDE1:
@LogReport("Bool is TRUE");
PRC INCLUDE2:
@LogReport("Bool is FALSE");
Note : This text was machine-translated and may contain inaccuracies.
