|
83 | 83 | } |
84 | 84 | \end{cppcode*} |
85 | 85 | \begin{itemize} |
86 | | - \item \mintinline{cpp}{break} is not mandatory but... |
87 | | - \item cases are entry points, not independent pieces |
88 | | - \item execution falls through to the next case without a \mintinline{cpp}{break}! |
89 | | - \item \mintinline{cpp}{default} may be omitted |
| 86 | + \item The \mintinline{cpp}{break} statement is not mandatory but... |
| 87 | + \item Cases are entry points, not independent pieces |
| 88 | + \item Execution falls through to the next case without a \mintinline{cpp}{break}! |
| 89 | + \item The \mintinline{cpp}{default} case may be omitted |
90 | 90 | \end{itemize} |
91 | 91 | \end{block} |
92 | 92 | \pause |
|
142 | 142 | \end{frame} |
143 | 143 |
|
144 | 144 | \begin{frame}[fragile] |
145 | | - \frametitlecpp[17]{init-statements for if and switch} |
| 145 | + \frametitlecpp[17]{Init-statements for if and switch} |
146 | 146 | \begin{block}{} |
147 | 147 | Allows to limit variable scope in \mintinline{cpp}{if} and \mintinline{cpp}{switch} statements |
148 | 148 | \end{block} |
|
176 | 176 | \end{cppcode*} |
177 | 177 | \vspace{-0.2cm} |
178 | 178 | \begin{itemize} |
179 | | - \item initializations and increments are comma separated |
180 | | - \item initializations can contain declarations |
181 | | - \item braces are optional if loop body is a single statement |
| 179 | + \item Initializations and increments are comma separated |
| 180 | + \item Initializations can contain declarations |
| 181 | + \item Braces are optional if loop body is a single statement |
182 | 182 | \end{itemize} |
183 | 183 | \end{block} |
184 | 184 | \pause |
|
201 | 201 | \frametitlecpp[11]{Range-based loops} |
202 | 202 | \begin{block}{Reason of being} |
203 | 203 | \begin{itemize} |
204 | | - \item simplifies loops over ``ranges'' tremendously |
205 | | - \item especially with STL containers |
| 204 | + \item Simplifies loops over ``ranges'' tremendously |
| 205 | + \item Especially with STL containers |
206 | 206 | \end{itemize} |
207 | 207 | \end{block} |
208 | 208 | \begin{block}{Syntax} |
|
222 | 222 | \end{frame} |
223 | 223 |
|
224 | 224 | \begin{frame}[fragile] |
225 | | - \frametitlecpp[20]{init-statements for range-based loops} |
| 225 | + \frametitlecpp[20]{Init-statements for range-based loops} |
226 | 226 | \begin{block}{} |
227 | 227 | Allows to limit variable scope in range-based loops |
228 | 228 | \end{block} |
|
257 | 257 | } while(condition); |
258 | 258 | \end{cppcode*} |
259 | 259 | \begin{itemize} |
260 | | - \item braces are optional if the body is a single statement |
| 260 | + \item Braces are optional if the body is a single statement |
261 | 261 | \end{itemize} |
262 | 262 | \end{block} |
263 | 263 | \pause |
|
274 | 274 | \frametitlecpp[98]{Control structures: jump statements} |
275 | 275 | \begin{block}{} |
276 | 276 | \begin{description} |
277 | | - \item[break] exits the loop and continues after it |
278 | | - \item[continue] goes immediately to next loop iteration |
279 | | - \item[return] exists the current function |
280 | | - \item[goto] can jump anywhere inside a function, don't use! |
| 277 | + \item[break] Exits the loop and continues after it |
| 278 | + \item[continue] Goes immediately to next loop iteration |
| 279 | + \item[return] Exits the current function |
| 280 | + \item[goto] Can jump anywhere inside a function, avoid! |
281 | 281 | \end{description} |
282 | 282 | \end{block} |
283 | 283 | \pause |
|
0 commit comments