1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
\subsection{fullparentheses}
\label{labfullparentheses}
\noindent Name: \textbf{fullparentheses}\\
\phantom{aaa}activates, deactivates or inspects the state variable controlling output with full parenthesising\\[0.2cm]
\noindent Library names:\\
\verb| void sollya_lib_set_fullparentheses_and_print(sollya_obj_t);|\\
\verb| void sollya_lib_set_fullparentheses(sollya_obj_t);|\\
\verb| sollya_obj_t sollya_lib_get_fullparentheses();|\\[0.2cm]
\noindent Usage:
\begin{center}
\textbf{fullparentheses} = \emph{activation value} : \textsf{on$|$off} $\rightarrow$ \textsf{void}\\
\textbf{fullparentheses} = \emph{activation value} ! : \textsf{on$|$off} $\rightarrow$ \textsf{void}\\
\end{center}
Parameters:
\begin{itemize}
\item \emph{activation value} represents \textbf{on} or \textbf{off}, i.e. activation or deactivation
\end{itemize}
\noindent Description: \begin{itemize}
\item An assignment \textbf{fullparentheses} = \emph{activation value}, where \emph{activation value}
is one of \textbf{on} or \textbf{off}, activates respectively deactivates the output
of expressions with full parenthesising. In full parenthesising mode,
\sollya commands like \textbf{print}, \textbf{write} and the implicit command when an
expression is given at the prompt will output expressions with
parenthesising at all places where it is necessary for expressions
containing infix operators to be parsed back with the same
result. Otherwise parentheses around associative operators are
omitted.
If the assignment \textbf{fullparentheses} = \emph{activation value} is followed by an
exclamation mark, no message indicating the new state is
displayed. Otherwise the user is informed of the new state of the
global mode by an indication.
\end{itemize}
\noindent Example 1:
\begin{center}\begin{minipage}{15cm}\begin{Verbatim}[frame=single]
> autosimplify = off!;
> fullparentheses = off;
Full parentheses mode has been deactivated.
> print(1 + 2 + 3);
1 + 2 + 3
> fullparentheses = on;
Full parentheses mode has been activated.
> print(1 + 2 + 3);
(1 + 2) + 3
\end{Verbatim}
\end{minipage}\end{center}
See also: \textbf{print} (\ref{labprint}), \textbf{write} (\ref{labwrite}), \textbf{autosimplify} (\ref{labautosimplify})
|