summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/struktex/struktex-test-1.tex
blob: 97f3e957275aefeefb0effa043ee7b987f9e1fc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
%%
%% This is file `struktex-test-1.tex',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% struktex.dtx  (with options: `example2')
%% 
\documentclass[draft]{article}
\usepackage{struktex}

\begin{document}

\begin{struktogramm}(90,137)
    \assign%
    {
      \begin{declaration}[]
          \description{\(a, b, c\)}{three variables which are to be sorted}
          \description{\(tmp\)}{temporary variable for the circular swap}
      \end{declaration}
    }
    \ifthenelse{1}{2}{\(a\le c\)}{j}{n}
    \change
    \assign{\(tmp\gets a\)}
    \assign{\(a\gets c\)}
    \assign{\(c\gets tmp\)}
    \ifend
    \ifthenelse{2}{1}{\(a\le b\)}{j}{n}
    \ifthenelse{1}{1}{\(b\le c\)}{j}{n}
    \change
    \assign{\(tmp\gets c\)}
    \assign{\(c\gets b\)}
    \assign{\(b\gets tmp\)}
    \ifend
    \change
    \assign{\(tmp\gets a\)}
    \assign{\(a\gets b\)}
    \assign{\(b\gets tmp\)}
    \ifend
\end{struktogramm}

\end{document}
%%
%% 
%%
%% End of file `struktex-test-1.tex'.