Merge branch 'master' of git.martlubbers.net:msc-thesis1617
[msc-thesis1617.git] / mtaskext.examples.tex
index 431677e..d680072 100644 (file)
@@ -6,7 +6,7 @@ problem since this is included in the stopping condition of the interpreter.
 When the program counter exceeds the length of the program, the task
 terminates.
 
-\begin{lstlisting}[caption={Thermostat bytecode},language=c]
+\begin{lstlisting}[language=Clean,caption={Thermostat bytecode},language=c]
  0-1 : BCAnalogRead (Analog A0)
  2-5 : BCPush (Int 50)
  6   : BCGre
@@ -26,7 +26,7 @@ factorial after which is will return. The following listings shows the actual
 \gls{mTask} and the generated messages followed by the actual bytecode in a
 readable form.
 
-\begin{lstlisting}[caption={Factorial as an \gls{mTask}-\gls{Task}}]
+\begin{lstlisting}[language=Clean,caption={Factorial as an \gls{mTask}-\gls{Task}}]
 factorial :: Int -> Main (ByteCode () Stmt)
 factorial i = sds \y=i In
        namedsds \x=1 Named "result" In
@@ -44,7 +44,7 @@ Start = fst $ toMessages (OnInterval 500) (factorial 5) zero
 //[MTSds 2 (BCValue 5), MTSds 1 (BCValue 1), MTTask (OnInterval 500) ...]
 \end{lstlisting}
 
-\begin{lstlisting}[label={lst:actualbc},%
+\begin{lstlisting}[language=Clean,label={lst:actualbc},%
        caption={The resulting bytecode for the factorial function},language=C]
  0-2 : BCSdsFetch 1
  3-6 : BCPush (Int 1)