mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-25 14:28:05 +02:00
Prolog
This commit is contained in:
parent
683b8a645a
commit
82dd24d55b
10 changed files with 124 additions and 6 deletions
|
@ -136,13 +136,20 @@ Programmiersprachen können anhand der Art ihrer Typisierung unterschieden werde
|
|||
\end{beispiel}
|
||||
|
||||
\begin{definition}[Polymorphie]\xindex{Polymorphie}%
|
||||
Ein Typ heißt \textbf{polymorph}, wenn er mindestens einen Parameter hat.
|
||||
\begin{defenum}
|
||||
\item Ein Typ heißt polymorph, wenn er mindestens einen Parameter hat.
|
||||
\item Eine Funktion heißt polymorph, wenn ihr Verhalten nicht von dem
|
||||
konkreten Typen der Parameter abhängt.
|
||||
\end{defenum}
|
||||
\end{definition}
|
||||
|
||||
\begin{beispiel}[Polymorphie]
|
||||
In Java sind beispielsweise Listen polymorph:
|
||||
In Java sind beispielsweise Listen polymorphe Typen:
|
||||
|
||||
\inputminted[numbersep=5pt, tabsize=4]{java}{scripts/java/list-example.java}
|
||||
|
||||
Entsprechend sind auf Listen polymorphe Operationen wie \texttt{add} und
|
||||
\texttt{remove} definiert.
|
||||
\end{beispiel}
|
||||
|
||||
\begin{definition}[Statische und dynamische Typisierung]\xindex{Typisierung!statische}\xindex{Typisierung!dynamische}%
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue