cws/core_cw02.tex
changeset 501 3717785f2c37
parent 498 0f1b97538ad4
equal deleted inserted replaced
500:fd7f8aff848c 501:3717785f2c37
    32 apply an automated marking script to them.\medskip
    32 apply an automated marking script to them.\medskip
    33 
    33 
    34 \noindent
    34 \noindent
    35 In addition, the Scala part comes with reference
    35 In addition, the Scala part comes with reference
    36 implementations in form of \texttt{jar}-files. This allows you to run
    36 implementations in form of \texttt{jar}-files. This allows you to run
    37 any test cases on your own computer. For example you can call \texttt{scala-cli} on
    37 any test cases on your own computer. For example you can call \texttt{scala} on
    38 the command line with the option \texttt{--extra-jars docdiff.jar} and then
    38 the command line with the option \texttt{--extra-jars docdiff.jar} and then
    39 query any function from the template file. Say you want to find out
    39 query any function from the template file. Say you want to find out
    40 what the function \texttt{occurrences} produces: for this you just need
    40 what the function \texttt{occurrences} produces: for this you just need
    41 to prefix it with the object name \texttt{C2}.  If you want to find out what
    41 to prefix it with the object name \texttt{C2}.  If you want to find out what
    42 these functions produce for the list \texttt{List("a", "b", "b")},
    42 these functions produce for the list \texttt{List("a", "b", "b")},
    43 you would type something like:
    43 you would type something like:
    44 
    44 
    45 \begin{lstlisting}[language={},numbers=none,basicstyle=\ttfamily\small]
    45 \begin{lstlisting}[language={},numbers=none,basicstyle=\ttfamily\small]
    46 $ scala-cli --extra-jars docdiff.jar
    46 $ scala --extra-jars docdiff.jar
    47   
    47   
    48 scala> C2.occurrences(List("a", "b", "b"))
    48 scala> C2.occurrences(List("a", "b", "b"))
    49 ...
    49 ...
    50 \end{lstlisting}%$
    50 \end{lstlisting}%$
    51 
    51