Skip to content

Commit

Permalink
Don't give impression of undefined behavior being error
Browse files Browse the repository at this point in the history
The word "invalid" sounds too much like something which is definitely an error, which isn't the case here.
  • Loading branch information
henrikt-ma committed Sep 28, 2022
1 parent 0f1ed88 commit 9b24987
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chapters/operatorsandexpressions.tex
Expand Up @@ -179,8 +179,8 @@ \section{Evaluation Order}\label{evaluation-order}
Boolean b;
Integer I;
equation
b = (I >= 1 and I <= n) and v[I]; // Invalid
b = if (I >= 1 and I <= n) then v[I] else false; // Correct
b = (I >= 1 and I <= n) and v[I]; // May result in error
b = if (I >= 1 and I <= n) then v[I] else false; // Safe
\end{lstlisting}

To guard square against square root of negative number use \lstinline!noEvent!:
Expand Down

0 comments on commit 9b24987

Please sign in to comment.