

% add the PATH to retrieve cls and sty beamer styles files
\makeatletter
\providecommand*{\input@path}{}
\edef\input@path{{../../support/beamer/}\input@path}% prepend
\makeatother

% \documentclass{pharoslides}
% \documentclass[aspectratio=169]{pharoslides} % format 16/9
\documentclass[withvideo]{pharoslides} % format 16/9 + incrustation video

\graphicspath{{./figures/}{../}{../../support/beamer/imgs/}}

%Information to be included in the title page:
\title{Understanding Messages: Sequence and Cascade}
\subtitle{}
\author{Damien Cassou, Stéphane Ducasse and Luc Fabresse}
\institute{http://stephane.ducasse.free.fr}
\date{}
\slidesid{W2S04}

\begin{document}

\frame[plain]{\titlepage}



\begin{frame}[fragile]

\frametitle{Expression Sequence}

\code{.} is a separator

\begin{listing}{}
    expression1.
    expression2.
    expression3
\end{listing}

Example

\begin{listing}{}
    Transcript cr.
    Transcript show: 1.
    Transcript show: 2
\end{listing}
\end{frame}



\begin{frame}[fragile]

\frametitle{Expression Sequence}

\begin{itemize}
\item \code{.} is a separator, not a terminator 
\item no need to put one at the end
\item no point after temporary variable declaration
\end{itemize}

\begin{listing}{}
    | macNode pcNode |
    macNode := Workstation withName: #mac.
    macNode sendPacket: 'Hello World'
\end{listing}
\end{frame}



\begin{frame}[fragile]

\frametitle{Cascade: Sending Multiple Messages to an Object}

\begin{listing}{}
    Transcript cr.
    Transcript show: 1.
    Transcript show: 2
\end{listing}

is equivalent to:

\begin{listing}{}
    Transcript
        cr ;
        show: 1 ;
        show: 2
\end{listing}

\begin{itemize}
\item \code{;} is called a cascade
\end{itemize}
\end{frame}



\begin{frame}[fragile]

\frametitle{Cascade Example }

Sending Multiple Messages to an Object

\begin{listing}{}
    | c |
    c := OrderedCollection new.
    c add: 1.
    c add: 2
\end{listing}

is equivalent to:

\begin{listing}{}
    OrderedCollection new
        add: 1 ;
        add: 2 
\end{listing}

\begin{itemize}
\item \code{add: 2} is sent to the receiver of message \code{add: 1}
\item this receiver is the instance of \code{OrderedCollection}
\end{itemize}
\end{frame}



\begin{frame}[fragile]

\frametitle{What You Should Know}

\begin{itemize}
\item \code{.} is a separator
\item \code{;} (cascade) is useful to avoid repeating the receiver
\item the cascade returns the last message returned value
\end{itemize}
\end{frame}




% \setlength{\textwidth}{\originaltextwidth}
\setbeamertemplate{background canvas}{\insertBorderForHandout}

\begin{frame}[plain]

\begin{minipage}{\originaltextwidth}
\centering
\large


\vspace{2em}

A course by

\vspace{1em}

\hspace{-20px}\includegraphics[height=32px]{inriaLogo}\hspace{3em}\raisebox{7px}{and}\hspace{3em}\raisebox{-6px}{\includegraphics[height=30px]{logoutop}}

\vspace{2em}

in collaboration with

\vspace{1em}

\includegraphics[height=40px]{unisciellogo}\hskip 1.5em%
\raisebox{5px}{\includegraphics[height=30px]{unitlogo}}\hskip 2em%
\raisebox{8px}{\includegraphics[height=24px]{univLilleLogo}}\hskip 2em%
\raisebox{3px}{\includegraphics[height=29px]{logo-IMT}}\hskip 2em%
\raisebox{1px}{\includegraphics[height=32px]{minesDouaiLogo}}

\vspace{2.5em}

\includegraphics[width=50px]{by-nc-nd} \tiny \hskip 0.5em \raisebox{5px}{Inria 2016}

\medskip

\tiny
Except where otherwise noted, this work is licensed under CC BY-NC-ND 3.0 France

\url{https://creativecommons.org/licenses/by-nc-nd/3.0/fr/} 

\end{minipage}
\end{frame}

\end{document}

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