\documentclass[xcolor=hyperref,hyperef={naturalnames,pdfpagelabels},french]{beamer}
\usepackage{etex}
\usepackage[beamer]{preambule}
\usepackage[french,vlined,boxed]{algorithm2e}

\usepackage{movie15}
%\usepackage{multimedia}
\usepackage{cclicenses}
\usepackage{cclicence}

\graphicspath{{/home/moi/Lycee/2nde/2009_10/}{/home/moi/Photos/Maths/}{/home/moi/Figures/FigSTI/}{/home/moi/Figures/FigSeconde/}{/home/moi/Figures/figuresTS/}{/home/moi/Lycee/TDmaple/2007_8/}{/home/moi/IREM/IREM10_06_09/}}



\lstset{numbers=none,language=XCAS,xleftmargin=10pt,%
keywordstyle =\color{blue!30}\usefont{OT1}{cmtt}{b}{n},basicstyle=\ttfamily\color{white},commentstyle=\normalfont\scriptsize\slshape,breaklines=true,backgroundcolor=\color{black!80!red},frame=trBL,framerule=1pt,framesep=4pt,rulesep=1pt,showstringspaces=false,stringstyle=\slshape,captionpos=b}

\renewcommand\FancyVerbFormatLine[1]{\colorbox{green}{#1}}

\mode<presentation>
{
  \usetheme[secheader]{Madrid}
  % or ...Warsaw

  \setbeamercovered{highly dynamic}
  % or whatever (possibly just delete it)
}
\usepackage{elephantbird}

\title[] % (optional, use only with long paper titles)
{XCAS pour l'impatient}

\subtitle{ l'essentiel pour programmer avec XCAS au lycée}

\author[] % (optional, use only with lots of authors)
{Guillaume CONNAN  }
% - Give the names in the same order as the appear in the paper.
% - Use the inst{?} command only if the authors have different
%   affiliation.

\institute{\textsc{IREM} de Nantes}% (optional, but mostly needed)

\logo{\includegraphics[scale=0.15]{logoirem}}

\date[] % (optional, should be abbreviation of conference name)
{\today}
% - Either use conference name or its abbreviation.
% - Not really informative to the audience, more for people (including
%   yourself) who are reading the slides online

\subject{XCAS pour l'impatient}


\beamerdefaultoverlayspecification{<+->}

\AtBeginSubsubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Sommaire}
 {\scriptsize
%\begin{multicols}{2}
    \tableofcontents[currentsection,currentsubsection]
%       \end{multicols}
}

  \end{frame}
}




\AtBeginSubsection[]
{
  \begin{frame}<beamer>
    \frametitle{Sommaire}
 {\scriptsize
%\begin{multicols}{2}
    \tableofcontents[currentsection,currentsubsection]
%       \end{multicols}
}

  \end{frame}
}





\AtBeginSection[]
{
  \begin{frame}<beamer>
    \frametitle{Sommaire}
 {\scriptsize
%\begin{multicols}{2}
    \tableofcontents[currentsection]
%       \end{multicols}
}

  \end{frame}
}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

\beamerdefaultoverlayspecification{<+->}









\begin{document}


\begin{frame}
  \titlepage
\end{frame}

\begin{frame}
 \frametitle{Sommaire}
{\scriptsize
%\begin{multicols}{2} 
 \tableofcontents
%\end{multicols}
}

 
 \end{frame}

\section{Installation et utilisation}


\begin{frame}
  Vous    récupérez    la    version    pour    votre    O.S.    sur    le
\href{http://www-fourier.ujf-grenoble.fr/~parisse/irem.html}{Site XCAS}.

Vous suivez les instructions et voilà...
\end{frame}

\begin{frame}
  \begin{figure}
\begin{center}
  \includegraphics[width=0.98\textwidth]{xcas1}
\end{center}
\end{figure}
\end{frame}


\begin{frame}
  
Il y a  beaucoup à dire sur XCAS mais  nous nous contenterons d'explorer
les outils de programmation.

\pause

Nous allons donc ouvrir une fenêtre de programmation en tapant
\begin{center}
  \keystroke{Alt} + \keystroke{P}
\end{center}


\pause

Une fenêtre de programmation apparaît~:

\end{frame}


\begin{frame}
  \begin{figure}
\begin{center}
  \includegraphics[width=0.98\textwidth]{xcas2}
\end{center}
\end{figure}
\end{frame}




\begin{frame}
  
Il ne reste plus qu'à programmer...

\end{frame}



\section{Les procédures}

\begin{frame}[fragile]

XCAS est écrit en C++ et  a donc une syntaxe proche de ce langage...mais
en bien  plus simple. Cependant,  comme le C++,  l'outil de base  est la
procédure qui \emph{ressemble} aux fonctions de CAML.

\pause


Par exemple, nous voudrions créer  une procédure qui prend trois nombres
$a$,  $b$  et $c$  en  argument  et  renvoie $b^2-4ac$.  Appelons-la  au
hasard...\verb+Delta+~:  
\end{frame}



\begin{frame}
  
\begin{figure}
\begin{center}
  \includegraphics[width=0.98\textwidth]{xcas3}
\end{center}
\end{figure}
\end{frame}




\begin{frame}[fragile]
  
Par la suite, nous représenterons ce script par~:

\pause

\begin{lstlisting}[caption={}]
Delta(a,b,c):={
b^2-4*a*c
}:;
\end{lstlisting}


\pause

Il suffit ensuite de cliquer sur OK ou de taper sur \keystroke{F9}

\end{frame}


\begin{frame}
  
\begin{figure}
\begin{center}
  \includegraphics[width=0.98\textwidth]{xcas4}
\end{center}
\end{figure}
\end{frame}


\begin{frame}[fragile]
  
Pour évaluer  cette procédure en  un certain triplet, nous  entrons dans
une cellule de calcul~:

\begin{lstlisting}[caption={}]
Delta(1,1,1)
\end{lstlisting}


\end{frame}


\begin{frame}
  
ce qui apparaît sous la forme~:


\begin{figure}
\begin{center}
  \includegraphics[width=0.98\textwidth]{xcas5}
\end{center}
\end{figure}

\end{frame}




\section{Tests}


\begin{frame}
  
Avec XCAS, on peut programmer en français ou en anglais.
\end{frame}




\begin{frame}[fragile]
  
\begin{lstlisting}[caption={}]
val_abs(x):={
si x>0 alors x sinon -x fsi;
}:;
\end{lstlisting}

\end{frame}


\begin{frame}[fragile]
  ou

\begin{lstlisting}[caption={}]
val_abs(x):={
if(x>0)then{x}else{-x}
}:;
\end{lstlisting}

\end{frame}





\begin{frame}[fragile]
  
ou même

\begin{lstlisting}[caption={}]
val_abs(x):={
ifte(x>0,x,-x)
}:;
\end{lstlisting}
\end{frame}





\section{Boucles}

\begin{frame}
  
Le bilinguisme est ici aussi  de rigueur. Calculons par exemple la somme
des premiers entiers~:
\end{frame}



\begin{frame}[fragile]
  
\begin{lstlisting}[caption={}]
Somme(n):={
local S,k;
S:=0;
pour k de 1 jusque n faire
  S:=S+k;
fpour;
return(S);
}:;
\end{lstlisting}

\end{frame}




\begin{frame}
  
ce qui apparaît sous la forme~:


\begin{figure}
\begin{center}
  \includegraphics[width=0.98\textwidth]{xcas6}
\end{center}
\end{figure}

\end{frame}

\begin{frame}[fragile]
  ou 

\begin{lstlisting}[caption={}]
Somme(n):={
local S,k;
S:=0;
for(k:=1;k<=n;k:=k+1){
   S:=S+k
}
return(S);
}:;
\end{lstlisting}
\end{frame}







\begin{frame}[fragile]
  
ou 

\begin{lstlisting}[caption={}]
Somme(n):={
local S,k;
S:=0;
k:=1;
tantque k<=n faire 
   S:=S+k;
   k:=k+1;
ftantque;
return(S);
}:;
\end{lstlisting}

\end{frame}



\begin{frame}[fragile]
  
ou

\begin{lstlisting}[caption={}]
Somme(n):={
local S,k;
S:=0;
k:=1;
while(k<=n){ 
   S:=S+k;
   k:=k+1;
};
return(S);
}:;
\end{lstlisting}

\end{frame}








\end{document}

%%% Local Variables: 
%%% TeX-master: t
%%% End: 
