Skip to content

Commit

Permalink
UseHspaceInstead
Browse files Browse the repository at this point in the history
  • Loading branch information
HansOlsson committed Nov 15, 2021
1 parent 9767f41 commit 5ee5abc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chapters/operatorsandexpressions.tex
Expand Up @@ -99,10 +99,10 @@ \section{Operator Precedence and Associativity}\label{operator-precedence-and-as
The unary minus and plus in Modelica is slightly different than in Mathematica\footnote{\emph{Mathematica} is a registered trademark of Wolfram Research Inc.} and in MATLAB\footnote{\emph{MATLAB} is
a registered trademark of MathWorks Inc.}, since the following expressions are illegal (whereas in Mathematica and in MATLAB these are valid expressions):
\begin{lstlisting}[language=modelica]
2 * -2 // = -4 in Mathematica/MATLAB; is illegal in Modelica
- - 2 // = 2 in Mathematica/MATLAB; is illegal in Modelica
+ + 2 // = 2 in Mathematica/MATLAB; is illegal in Modelica
2 - -2 // = 4 in Mathematica/MATLAB; is illegal in Modelica
2*$\hspace{0pt}$-2 // = -4 in Mathematica/MATLAB; is illegal in Modelica
-$\hspace{0pt}$-2 // = 2 in Mathematica/MATLAB; is illegal in Modelica
+$\hspace{0pt}$+2 // = 2 in Mathematica/MATLAB; is illegal in Modelica
2-$\hspace{0pt}$-2 // = 4 in Mathematica/MATLAB; is illegal in Modelica
\end{lstlisting}

Non-associative exponentiation and array range operator:
Expand Down

0 comments on commit 5ee5abc

Please sign in to comment.