Skip to content

include

Syntax

include <filename>

Description

Includes the contents of the given file into the FRED program.

This statement allows users to write modular FRED programs by using separate .fred files for each condition in a model. In addition, parameters and variables can be specified in their own .fred files. The include statement inserts the contents of the given file at the point where the include statement appears when the program is compiled.

Examples

Here we show include statements being used to include two .fred files called simpleflu.fred and params.fred into a FRED program. params.fred is assumed to be in the same directory as the file that contains the include statement. The full path to simpleflu.fred is given relative to the FRED_PROJECT directory that must be specified as an environment variable.

include $FRED_PROJECT/FRED-tutorials/simpleflu/simpleflu.fred
include params.fred

See Also