Commit 06041fdc authored by Rémy Huet's avatar Rémy Huet 💻

Elif

parent 40fd7714
Pipeline #33608 passed with stage
in 18 seconds
......@@ -80,3 +80,61 @@
{\large fi}
\end{Verbatim}
\end{frame}
\begin{frame}[fragile]{Si \ldots sinon si \ldots sinon}
\begin{block}{}
\enquote{Et si je veux faire encore plus compliqué ?}
\end{block}
Il existe encore un autre moyen d'écrire des \texttt{SI} :
\begin{Verbatim}
{\large SI condition}
{\large ALORS}
{\large actions}
{\large SINON SI condition}
{\large ALORS}
{\large actions}
{\large SINON}
{\large actions}
{\large FIN_SI}
\end{Verbatim}
\begin{alertblock}{}
NB: On peut mettre autant de \enquote{SINON SI \ldots ALORS \ldots} que l'on veut
\end{alertblock}
\end{frame}
\begin{frame}[fragile]{En bash}
\begin{block}{}
En bash, \enquote{SINON SI} s'écrit \texttt{elif} (contraction de \texttt{else} et \texttt{if}) :
\end{block}
\medskip
\begin{Verbatim}
{\large if [ condition ]}
{\large then}
{\large actions}
{\large elif [ condition ]}
{\large then}
{\large actions}
{\large else}
{\large actions}
{\large fi}
\end{Verbatim}
\end{frame}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment