Skip to content

Commit

Permalink
Clarify for-loop syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
hageboeck committed Mar 25, 2024
1 parent 42772c7 commit aa7c971
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion talk/basicconcepts/control.tex
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,14 @@
\end{cppcode*}
\vspace{-0.2cm}
\begin{itemize}
\item Initializations and increments are comma separated
\item Initializations and increments are separated by semicolon
\item Initializations can contain declarations
\item Multiple declarations / increments can be separated by comma
\item Braces are optional if loop body is a single statement
\end{itemize}
\end{block}
\pause
\vspace{-2mm}
\begin{exampleblock}{Practical example}
\begin{cppcode*}{firstnumber=4}
for(int i = 0, j = 0 ; i < 10 ; i++, j = i*i) {
Expand Down

0 comments on commit aa7c971

Please sign in to comment.