From a35e114625bc282eedb7326e9d3ac525cf7a5690 Mon Sep 17 00:00:00 2001 From: Johannes Pfeifer <jpfeifer@gmx.de> Date: Tue, 6 Dec 2022 19:21:11 +0100 Subject: [PATCH] Manual: document passing of strings to macro processor Closes #1877 --- doc/manual/source/running-dynare.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/manual/source/running-dynare.rst b/doc/manual/source/running-dynare.rst index 5d89cf6ff3..64e55c1c53 100644 --- a/doc/manual/source/running-dynare.rst +++ b/doc/manual/source/running-dynare.rst @@ -373,7 +373,9 @@ by the ``dynare`` command. info on passing a ``MACRO_EXPRESSION`` argument containing spaces. Note that an expression passed on the command line can reference variables defined before it. If ``MACRO_EXPRESSION`` is omitted, the variable is - assigned the ``true`` logical value. + assigned the ``true`` logical value. Strings assigned to a macro variable + need to be enclosed in double quoted strings. This also allows for passing + single quotes within the strings. *Example* @@ -381,7 +383,7 @@ by the ``dynare`` command. .. code-block:: matlab - >> dynare <<modfile.mod>> -DA=true '-DB="A string with space"' -DC=[1,2,3] '-DD=[ i in C when i > 1 ]' -DE + >> dynare <<modfile.mod>> -DA=true '-DB="A string with space"' -DC=[1,2,3] '-DD=[ i in C when i > 1 ]' -DE -Ddatafile_name="'my_data_file.mat'" .. option:: -I<<path>> -- GitLab