summaryrefslogblamecommitdiffstats
path: root/doc/praes2/main.vrb
blob: fc60849a3d79a7510959ca61860b674aa6f85add (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                              
\frametitle {Gruppe: Quellsprache (Beispiel)}\begin {verbatim}
fun fib[a]
    if a < 2
        @1
    end
    @(call fib[a-1] + call fib[a-2])
end

fun main[]
    sum = 0
    i = 1
    while i <= 10
        sum = sum + call fib[i]
        i = i + 1
    end
    @sum
end
\end{verbatim}