From e6711d688cdbfab7cc2c8cbc3ce27d12ab03a8ff Mon Sep 17 00:00:00 2001 From: Ian Hinder Date: Wed, 21 Mar 2012 20:14:06 +0100 Subject: KrancDoc.tex: Update documentation for new conditionals --- Doc/KrancDoc.tex | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/Doc/KrancDoc.tex b/Doc/KrancDoc.tex index c395ae2..a39cb74 100644 --- a/Doc/KrancDoc.tex +++ b/Doc/KrancDoc.tex @@ -446,7 +446,7 @@ Where -> Everywhere \subsubsection{Conditional} This key allows a calculation to be performed conditionally based on -parameter set by the user at run time. Setting +parameters set by the user at run time. Setting \begin{center} \begin{minipage}{0.8 \textwidth} \begin{verbatim} @@ -454,24 +454,25 @@ Conditional -> \end{verbatim} \end{minipage} \end{center} -where \verb|| is an expression will cause the calculation to be -performed only if that parameter is set to \verb||. An -expression can be one of the following: +where \verb|| is a boolean expression over parameter names and +literal values will cause the calculation to be performed only if the +expression evaluates to true at runtime. -\begin{itemize} -\item \verb! == ! -\item \verb! || ! -\item \verb! && ! -\item An integer -\item A string -\item A parameter name either as a Mathematica symbol, or as - \verb|Parameter[]| for the cases where the parameter name cannot be - represented as a Mathematica symbol (e.g.~if it contains - underscores). -\end{itemize} +The expression can contain \verb|&&| (and), \verb!||! (or), \verb|!| +(not) operators as well as symbolic parameter names and numeric and +string constants. + +Comparison of parameters with literal values can be expressed using +\verb| == | or \verb| != |. + +In the case that a parameter name cannot be represented as a +Mathematica symbol (e.g.~if it contains underscores), it should be +represented as \verb|Parameter[]| where \verb|| is a +string containing the parameter name. Note that the construct \verb| == | will be evaluated -by Mathematica as either True or False, and so should not be used. +immediately by Mathematica as either True or False, and so should not +be used. Example: -- cgit v1.2.3