coursc/branchements/15.tex

27 lines
525 B
TeX
Raw Normal View History

2014-02-24 17:38:56 +00:00
\begin{frame}[containsverbatim]
\frametitle{\secname}
\framesubtitle{\subsecname~III}
{\footnotesize\begin{exampleblock}{Conversion des if-else if-else en switch}
\begin{verbatim}
void testVal(int a) {
switch(a) {
case 0:
//instructions 1
break;
case 1:
//instructions 2
break;
... // signifie une ellipse dans l'exemple
case 19:
//instructions 20
break;
default:
//instructions 21
break;
}
}\end{verbatim}
\end{exampleblock}}
\end{frame}