cws/core_cw02.tex
changeset 468 c71ae4477e55
parent 423 554278cd4b70
child 471 31b81f20fd9a
equal deleted inserted replaced
467:1b879b3e704e 468:c71ae4477e55
    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 Scala on
    37 any test cases on your own computer. For example you can call scala-cli on
    38 the command line with the option \texttt{-cp 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 -cp docdiff.jar
    46 $ scala-cli --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