diff options
Diffstat (limited to 'doc/UsersGuide/Notes.tex')
-rw-r--r-- | doc/UsersGuide/Notes.tex | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/doc/UsersGuide/Notes.tex b/doc/UsersGuide/Notes.tex index 4778c3e8..373bb155 100644 --- a/doc/UsersGuide/Notes.tex +++ b/doc/UsersGuide/Notes.tex @@ -1349,6 +1349,23 @@ Table~\ref{tab:expression_functions} lists the supported functions. Expressions can refer to parameters which are already set by using the fully qualified name \texttt{thorn::parameter} as described below. +Arrays of parameters can be set by including an integer expression inside +the square brackets following the name, e.g. \texttt{thorn::parameters[0]}. +Optionally, an array of parameters may be set by means of a comma delimted +list of values inside square brackets. E.g. the following two examples +are equivalent. + +Example 1: +\begin{verbatim} +thorn::parameters[0] = 4.8 +thorn::parameters[1] = 3.2 +\end{verbatim} + +Example 2: +\begin{verbatim} +thorn::parameters = [4.8, 3.2] +\end{verbatim} + The parameter parser knows about four types: integers, reals, booleans, and strings. The \verb|%| operator is applicable only to ints. In cases where this is clear, types will be converted, e.g. \verb|3.0| will convert to an integer, but not \verb|3.1|. @@ -1357,7 +1374,7 @@ in double quotes and make it a string. Please see the file \texttt{par.peg} in the directory \texttt{Cactus/src/piraha/pegs} for the full grammar describing the par file. -\begin{table} +\begin{table}[htbp] \begin{tabular}{|ll@{\hspace{.5cm}}|ll|} \hline \multicolumn{2}{|c|}{Logical operators} & \verb|+| & no-op\\ |