Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified JsonPreprocessor/JsonPreprocessor.pdf
Binary file not shown.
45 changes: 34 additions & 11 deletions packagedoc/additional_docs/The JSONP format.tex
Original file line number Diff line number Diff line change
Expand Up @@ -933,39 +933,62 @@ \section{Substitution of dollar operator expressions}

\vspace{2ex}

\textbf{Substitution vs. overwriting}
\textbf{Overwriting vs. substitution}

\vspace{2ex}

With the last example in this section we take a deeper look at the syntax difference between substitution and overwriting.
With the last two examples in this section we take a deeper look at the syntax difference between overwriting and substitution.

\vspace{2ex}

\textbf{1. Overwriting:}

With \pcode{$\{param2\} : $\{param1\}} the initial value \pcode{"XYZ"} of parameter \pcode{param2} is overwritten with the value \pcode{"ABC"}
of parameter \pcode{param1}.

\begin{pythoncode}
{
"param1" : "ABC",
"param2" : "XYZ",
"param1" : "ABC",
"param2" : "XYZ",
//
${param2} : ${param1},
"${param2}" : ${param1}
${param2} : ${param1},
}
\end{pythoncode}

\vspace{2ex}

\textit{Overwriting:}
\textbf{Result:}

With \pcode{$\{param2\} : $\{param1\}} the initial value \pcode{"XYZ"} of parameter \pcode{param2} is overwritten with the value \pcode{"ABC"}
of parameter \pcode{param1}.
\begin{pythonlog}
{"param1" : "ABC",
"param2" : "ABC"}
\end{pythonlog}

\vspace{2ex}

\textit{Substitution:}
\textbf{2. Substitution:}

With \pcode{"$\{param2\}" : $\{param1\}} a new parameter with name \pcode{XYZ} (the value of \pcode{param2}) and value \pcode{"ABC"}
is created.

\begin{pythoncode}
{
"param1" : "ABC",
"param2" : "XYZ",
//
"${param2}" : ${param1},
}
\end{pythoncode}

\vspace{2ex}

The quotes around \pcode{$\{param2\}} make the difference.
\textbf{Result:}

\begin{pythonlog}
{"param1" : "ABC",
"param2" : "XYZ",
"XYZ" : "ABC"}
\end{pythonlog}

% --------------------------------------------------------------------------------------------------------------

Expand Down
4 changes: 2 additions & 2 deletions test/component_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#
# --------------------------------------------------------------------------------------------------------------
#
VERSION = "0.1.0"
VERSION_DATE = "03.08.2023"
VERSION = "0.2.0"
VERSION_DATE = "07.08.2023"
#
# --------------------------------------------------------------------------------------------------------------
#TM***
Expand Down
Loading