Skip to content
Snippets Groups Projects
Select Git revision
  • 4bba274f3931222df89f3a04b016340f6b2222df
  • master default
  • julia
  • created_preprocessor_repo
4 results

StaticModel.cc

Blame
  • Forked from Dynare / preprocessor
    Source project has a limited visibility.
    the-model-file.rst 627.11 KiB

    The model file

    Conventions

    A model file contains a list of commands and of blocks. Each command and each element of a block is terminated by a semicolon (;). Blocks are terminated by end;.

    If Dynare encounters an unknown expression at the beginning of a line or after a semicolon, it will parse the rest of that line as native MATLAB code, even if there are more statements separated by semicolons present. To prevent cryptic error messages, it is strongly recommended to always only put one statement/command into each line and start a new line after each semicolon. [1]

    Lines of codes can be commented out line by line or as a block. Single-line comments begin with // and stop at the end of the line. Multiline comments are introduced by /* and terminated by */.

    Examples

    // This is a single line comment
    var x; // This is a comment about x
    /* This is another inline comment about alpha */  alpha = 0.3;
    /*
     This comment is spanning
     two lines.
    */

    Note that these comment marks should not be used in native MATLAB code regions where the % should be preferred instead to introduce a comment. In a verbatim block, see :ref:`verbatim`, this would result in a crash since // is not a valid MATLAB statement).

    Most Dynare commands have arguments and several accept options, indicated in parentheses after the command keyword. Several options are separated by commas.