mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-03-14 10:50:05 +01:00
[SPCA] Add note on comma operator
This commit is contained in:
@@ -33,6 +33,11 @@ Very low precedence belongs to boolean operators \verb|&&| and \texttt{||}, as w
|
|||||||
\caption{\lC\ operators ordered in descending order by precedence}
|
\caption{\lC\ operators ordered in descending order by precedence}
|
||||||
\label{tab:c-operators}
|
\label{tab:c-operators}
|
||||||
\end{table}
|
\end{table}
|
||||||
|
In an expression like this
|
||||||
|
\mint{c}|(expr1, expr2)|
|
||||||
|
the first expression is evaluated, its result is discarded, the second expression is executed and its result is returned.
|
||||||
|
It is also possible to chain them, i.e. to use multiple without parenthesis, the last expression's value is ultimately returned.
|
||||||
|
Of note is that the expressions have to be encased in parenthesis.
|
||||||
|
|
||||||
\shade{blue}{Associativity}
|
\shade{blue}{Associativity}
|
||||||
\begin{itemize}
|
\begin{itemize}
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user