\typeout{Documentstyle-Option fuer Flussdiagramme Vers. 0.1 }
%
%       Style-Option zum Erstellen von Flussdiagrammen
%
%
%
%       1. Subelemente
%
% 
%
\long\def\fdgrau{\put(0.25,0.5){\line(2,1){0.75}}\put(0.25,0.5){\line(2,-1){0.75}}
\put(1.75,0.5){ \line(-2,1){0.75}}\put(1.75,0.5){\line(-2,-1){0.75}}}
%
\long\def\fdgiokas{\put(0,0.125){\line(1,3){0.25} }
\put(1.75,0.125){\line(1,3){0.25}} 
\put(0,0.125){\line(1,0){1.75}}
\put(0.25,0.875){\line(1,0){1.75}}}

%
\long\def\fdgkas{\put(0.125,0.125){\framebox(1.75,0.75){}}}
%
\long\def\fdgtext#1{\put(0.125,0.125){\makebox(1.75,0.75){#1}}}
%
\long\def\fdgtexttwo#1#2{\put(0.125,0.5){\makebox(1.75,0.375){#1}}
\put(0.125,0.125){\makebox(1.75,0.375){#2}}}
%
\long\def\fdgsubkas{\put(0.125,0.125){\framebox(1.75,0.75){}}
\put(0.155,0.125){\line(0,1){0.75}}\put(1.845,0.125){\line(0,1){0.75}}}
%
\long\def\fdgovg{\put(1,0.5){\oval(1.75,0.75){}}}
\long\def\fdgovs{\put(1,0.5){\oval(1,0.25){}}}
\long\def\fdgcir{\put(1,0.5){\circle{0.25}}}
%
\long\def\fdgvecll{\put(0,0.5){\vector(1,0){0.825}}}
\long\def\fdgveclr{\put(2,0.5){\vector(-1,0){0.825}}}
%
\long\def\fdgvecml{\put(0,0.5){\vector(1,0){0.5}}}
\long\def\fdgvecmr{\put(2,0.5){\vector(-1,0){0.5}}}
%
\long\def\fdgvecsl{\put(0,0.5){\vector(1,0){0.125}}}
\long\def\fdgvecsr{\put(2,0.5){\vector(-1,0){0.125}}}
%
\long\def\fdgvecmb{\put(1,0){\vector(0,1){0.375}}}
\long\def\fdgvecmt{\put(1,1){\vector(0,-1){0.375}}}
%
\long\def\fdgveclb{\put(1,0){\vector(0,1){0.375}}}
\long\def\fdgveclt{\put(1,1){\vector(0,-1){0.375}}}
%
\long\def\fdgvecsb{\put(1,0){\vector(0,1){0.125}}}
\long\def\fdgvecst{\put(1,1){\vector(0,-1){0.125}}}
%
\long\def\fdglinell{\put(0,0.5){\line(1,0){0.825}}}
\long\def\fdglinelr{\put(2,0.5){\line(-1,0){0.825}}}
%
\long\def\fdglineml{\put(0,0.5){\line(1,0){0.5}}}
\long\def\fdglinemr{\put(2,0.5){\line(-1,0){0.5}}}
%
\long\def\fdglinesml{\put(0,0.5){\line(1,0){0.25}}}
\long\def\fdglinesmr{\put(2,0.5){\line(-1,0){0.25}}}
%%
\long\def\fdglinesl{\put(0,0.5){\line(1,0){0.125}}}
\long\def\fdglinesr{\put(2,0.5){\line(-1,0){0.125}}}
%
\long\def\fdglinelb{\put(1,0){\line(0,1){0.375}}}
\long\def\fdglinelt{\put(1,1){\line(0,-1){0.375}}}
%
\long\def\fdglinemb{\put(1,0){\line(0,1){0.375}}}
\long\def\fdglinemt{\put(1,1){\line(0,-1){0.375}}}
%
\long\def\fdglinesb{\put(1,0){\line(0,1){0.125}}}
\long\def\fdglinest{\put(1,1){\line(0,-1){0.125}}}
%
%
%
%     2. Berechnungen 
%
%
\newcount\fdgcol
\newcount\fdgcolnr
\newcount\fdgrow
\newcount\fdgrownr
%
\long\def\fdgx#1{\fdgcol=#1\multiply\fdgcol by 2\advance\fdgcol by -2}
\long\def\fdgy#1{\fdgrow=\fdgrownr\advance\fdgrow by -#1}
\long\def\fdgcoord(#1,#2){\fdgx#1\fdgy#2}
%
%    3. Positionieren Absolut 
%
%
%
\long\def\fdgput(#1,#2)#3{\fdgcoord(#1,#2)#3}
%
%
%
%
%
%    4. Das Environment
%
%         ( mit und ohne Rahmen )
\newenvironment{flowchart}[3]{\setlength{\unitlength}{#3}\fdgrownr=#2
\fdgcolnr=#1\multiply\fdgcolnr by 2\picture(\fdgcolnr,#2)(0,0)
\fdgcoord(1,1)}{\endpicture}
\newenvironment{frameflowchart}[3]{\setlength{\unitlength}{#3}\fdgrownr=#2
\fdgcolnr=#1\multiply\fdgcolnr by 2\picture(\fdgcolnr,#2)(0,0)
\put(0,0){\line(1,0){\fdgcolnr}}\put(0,#2){\line(1,0){\fdgcolnr}}
\put(\fdgcolnr,0){\line(0,1){#2}}\put(0,0){\line(0,2){#2}}\fdgcoord(1,1)}{\endpicture } 
%         16. If-Abfragen
%
%
%         Zuerst muss ja und nein bekannt sein
%
\long\def\fdgyesl{\put(0,0.25){\makebox(0.25,0.25){\small y}}}
\long\def\fdgyesb{\put(1,-0.1){\makebox(0.25,0.25){\small y}}}
\long\def\fdgyesr{\put(1.75,0.25){\makebox(0.25,0.25){\small y}}}
\long\def\fdgnol{\put(0,0.25){\makebox(0.25,0.25){n\small }}}
\long\def\fdgnob{\put(1,-0.1){\makebox(0.25,0.25){\small n}}}
\long\def\fdgnor{\put(1.75,0.25){\makebox(0.25,0.25){\small n}}}
%
%   Eingang nur oben !
% 
%
%
%
%    Ab hier prative Addressierung !!!!
%
%    18. Verbindungen 
%
%
\long\def\fdgtb{\put(\fdgcol,\fdgrow){\picture(2,1)(0,0)
\put(1,0){\line(0,1){1}}\endpicture}\advance\fdgrow by -1}
%
\long\def\fdglr{\put(\fdgcol,\fdgrow){\picture(2,1)(0,0)
\put(0,0.5){\line(1,0){2}}\endpicture}\advance\fdgrow by -1}
%
\long\def\fdgtl{\put(\fdgcol,\fdgrow){\@picture(2,1)(0,0)
\put(1,0.5){\line(-1,0){1}}\put(1,0.5){\line(0,1){0.5}}
\endpicture}\advance\fdgrow by -1}
%
\long\def\fdgtr{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \put(1,0.5){\line(1,0){1}}
                             \put(1,0.5){\line(0,1){0.5}}
               \endpicture } \advance\fdgrow by -1  }
%
\long\def\fdgbl{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \put(1,0.5){\line(-1,0){1}}
                             \put(1,0.5){\line(0,-1){0.5}}
               \endpicture } \advance\fdgrow by -1  }
%
\long\def\fdgbr{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \put(1,0.5){\line(1,0){1}}
                             \put(1,0.5){\line(0,-1){0.5}}
               \endpicture } \advance\fdgrow by -1  }
%
%
%        19.         grosse Eingangs-Labels
%
%
\long\def\fdggint#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovg
                             \fdgtext{#1}
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgginr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovg
                             \fdgtext{#1}
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgginb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovg
                             \fdgtext{#1}
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgginl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovg
                             \fdgtext{#1}
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%
%        20.         grosse Eingangs-Labels
%
%
\long\def\fdgsint#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovs
                             \fdgtext{#1}
                             \fdglinemt
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsinr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovs
                             \fdgtext{#1}
                             \fdglinemr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsinb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovs
                             \fdgtext{#1}
                             \fdglinemb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsinl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovs
                             \fdgtext{#1}
                             \fdglineml
               \endpicture } \advance\fdgrow by -1  }
%
%
%        21.         grosse Ausgangs-Labels
%
%
\long\def\fdggoutt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovg
                             \fdgtext{#1}
                             \fdgvecst
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdggoutr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovg
                             \fdgtext{#1}
                             \fdgvecsr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdggoutb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovg
                             \fdgtext{#1}
                             \fdgvecsb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdggoutl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovg
                             \fdgtext{#1}
                             \fdgvecsl
               \endpicture } \advance\fdgrow by -1  }
%
%
%        22.         grosse Labels
%
%
\long\def\fdgsoutt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovs
                             \fdgtext{#1}
                             \fdgvecmt
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsoutr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovs
                             \fdgtext{#1}
                             \fdgvecmr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsoutb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovs
                             \fdgtext{#1}
                             \fdgvecmb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsoutl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgovs
                             \fdgtext{#1}
                             \fdgvecml
               \endpicture } \advance\fdgrow by -1  }
%
%
%      23. Anweisungen 
%
%       left in , elsewhere out
%
\long\def\fdganwlr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdganwlt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdganwlb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
%
%       top in , elsewhere out
%
\long\def\fdganwtr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdganwtb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdganwtl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       bottom in , elsewhere out
%
\long\def\fdganwbr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdganwbt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsb
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdganwbl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsb
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       right in , elsewhere out
%
\long\def\fdganwrl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdganwrt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdganwrb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }

%
%
%      24. Subroutinen 
%
%       left in , elsewhere out
%
\long\def\fdgsublr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsublt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsublb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
%
%       top in , elsewhere out
%
\long\def\fdgsubtr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsubtb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsubtl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       bottom in , elsewhere out
%
\long\def\fdgsubbr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsubbt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsb
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsubbl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsb
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       right in , elsewhere out
%
\long\def\fdgsubrl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsubrt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgsubrb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }

%
%
%      25. I/O 
%
%       left in , elsewhere out
%
\long\def\fdgiolr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiolt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiolb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
%
%       top in , elsewhere out
%
\long\def\fdgiotr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiotb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiotl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       bottom in , elsewhere out
%
\long\def\fdgiobr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiobt#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsb
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiobl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsb
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       right in , elsewhere out
%
\long\def\fdgiorl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiort#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiorb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtext{#1}
                             \fdgvecsr
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }

%
%
%      26. Anweisungen 
%               zweizeilig
%
%       left in , elsewhere out
%
\long\def\fdgtwoanwlr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoanwlt#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoanwlb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
%
%       top in , elsewhere out
%
\long\def\fdgtwoanwtr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoanwtb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoanwtl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       bottom in , elsewhere out
%
\long\def\fdgtwoanwbr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoanwbt#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsb
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoanwbl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsb
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       right in , elsewhere out
%
\long\def\fdgtwoanwrl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoanwrt#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoanwrb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }

%
%
%      27. Subroutinen 
%               zweizeilig
%
%       left in , elsewhere out
%
\long\def\fdgtwosublr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwosublt#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwosublb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
%
%       top in , elsewhere out
%
\long\def\fdgtwosubtr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwosubtb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwosubtl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       bottom in , elsewhere out
%
\long\def\fdgtwosubbr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwosubbt#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsb
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwosubbl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsb
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       right in , elsewhere out
%
\long\def\fdgtwosubrl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwosubrt#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwosubrb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgsubkas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }

%
%
%      28. I/O 
%               zweizeilig
%
%       left in , elsewhere out
%
\long\def\fdgtwoiolr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoiolt#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoiolb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
%
%       top in , elsewhere out
%
\long\def\fdgtwoiotr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoiotb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoiotl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecst
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       bottom in , elsewhere out
%
\long\def\fdgtwoiobr#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsl
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoiobt#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsb
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoiobl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsb
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
%
%       right in , elsewhere out
%
\long\def\fdgtwoiorl#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinesl
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoiort#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinest
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgtwoiorb#1#2{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgiokas
                             \fdgtexttwo{#1}{#2}
                             \fdgvecsr
                             \fdglinesb
               \endpicture } \advance\fdgrow by -1  }

%
%
%         29. If-Abfragen
%%
%   Eingang nur oben !
% 
\long\def\fdgiftlr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgrau
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesml\fdgyesl
                             \fdglinesmr\fdgnor
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiftrl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgrau
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesml
                             \fdglinesmr
               \endpicture } \advance\fdgrow by -1  }
%
%
\long\def\fdgiftlb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgrau
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesml\fdgyesl
                             \fdglinesb\fdgnob
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiftbl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgrau
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesb\fdgyesb
                             \fdglinesml\fdgnol
               \endpicture } \advance\fdgrow by -1  }
%
%
\long\def\fdgiftbr#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgrau
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesb\fdgyesb
                             \fdglinesmr\fdgnor
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgiftrb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgrau
                             \fdgtext{#1}
                             \fdgvecst
                             \fdglinesmr\fdgyesr
                             \fdglinesb\fdgnob
               \endpicture } \advance\fdgrow by -1  }
%
%
%
%
%       30.  Verbindungen 
%        
%             3 Eingaenge
%
%
\long\def\fdgcontrbol{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclt
                             \fdgveclr
                             \fdgveclb
                             \fdglinell
               \endpicture } \advance\fdgrow by -1  }
%
%
\long\def\fdgconltrob{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgvecll
                             \fdgveclt
                             \fdgveclr
                             \fdglinelb
               \endpicture } \advance\fdgrow by -1  }
%
%
\long\def\fdgconbltor{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclb
                             \fdgvecll
                             \fdgveclt
                             \fdglinelr
               \endpicture } \advance\fdgrow by -1  }
%
%
\long\def\fdgconrblot{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclr
                             \fdgveclb
                             \fdgvecll
                             \fdglinelt
               \endpicture } \advance\fdgrow by -1  }
%
%
%     2 Eingaenge
%%
\long\def\fdgcontrol{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclt
                             \fdgveclr
                             \fdglinell
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgcontbol{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclt
                             \fdgveclb
                             \fdglinell
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgconrbol{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclb
                             \fdgveclr
                             \fdglinell
               \endpicture } \advance\fdgrow by -1  }
%
%
\long\def\fdgconltob{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgvecll
                             \fdgveclt
                             \fdglinelb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgconlrob{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgvecll
                             \fdgveclr
                             \fdglinelb
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgcontrob{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclt
                             \fdgveclr
                             \fdglinelb
               \endpicture } \advance\fdgrow by -1  }
%
%
\long\def\fdgconblor{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclb
                             \fdgvecll
                             \fdglinelr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgconbtor{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclb
                             \fdgveclt
                             \fdglinelr
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgconltor{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgvecll
                             \fdgveclt
                             \fdglinelr
               \endpicture } \advance\fdgrow by -1  }
%
%
\long\def\fdgconrbot{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclr
                             \fdgveclb
                             \fdglinelt
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgconrlot{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclr
                             \fdgvecll
                             \fdglinelt
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgconblot{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \fdgcir
                             \fdgveclb
                             \fdgvecll
                             \fdglinelt
               \endpicture } \advance\fdgrow by -1  }
%
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%
%
\long\def\fdgbottom{\fdgrownr}
\long\def\fdgright{\fdgcolnr}
%
%
%    1.Versuch einer repeat-until-Struktur in flowcharts
%
%       Zaehler
%
\newcount\fdghelpa
\newcount\fdghelpb
\newcount\fdghelpc
\newcount\fdghelpd
\newcount\fdghelpe
%
%   Untere Zeile
%
%   Waagerechte Linie
%
\long\def\fdglineleft{\ifnum\fdghelpc>1{ 
                     \advance\fdghelpc by -1
                     \put(\fdgcol,\fdgrow){
                          \picture(2,1)(0,0)
                             \put(0,0.5){\line(1,0){2}}
                          \endpicture } 
                     \global\advance \fdgcol by 2
                     \fdglineleft } \fi }
%
%
%   Senkrechte Linie
%
\long\def\fdglinedown#1{\ifnum\fdghelpc>0  
                        \fdgptb{#1} \advance\fdghelpc by -1 \fdglinedown {#1} 
                   \fi } 
%
%  Parametrisierte Hilfslinien
%
\long\def\fdgptl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \put(0,0.5){\line(1,0){#1}}
                             \put({#1},0.5){\line(0,1){0.5}}
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgpbl#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                             \put(0,0.5){\line(1,0){#1}}
                             \put({#1},0.5){\line(0,-1){0.5}}
               \endpicture } \advance\fdgrow by -1  }
\long\def\fdgptb#1{\put(\fdgcol,\fdgrow){
               \picture(2,1)(0,0)
                   \put({#1},0){\line(0,1){1}}
               \endpicture } \advance\fdgrow by -1  }
%
%
%
%   Und ab geht er !
%
%
\long\def\fdgdo(#1,#2)[#3]#4while#5{\fdghelpd=\fdgcol \fdghelpe=\fdgrow % Speichern
             \fdgcontrob                                     % kreis
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgpbl {#3}
             \fdghelpc = #2 \fdglinedown {#3} 
             \fdgcol = \fdghelpd
             \fdgrow = \fdghelpe \advance\fdgrow  by -#2
             \advance\fdgrow  by -1
             \fdgiftrb{#5} 
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgptl {#3}
             \fdgcol=\fdghelpd \fdgrow=\fdghelpe \advance\fdgrow by -1 
             {#4}
             \fdgcol=\fdghelpd \fdgrow=\fdghelpe \advance\fdgrow by -2 
             \advance\fdgrow by -#2 
             }

%
%
%
\long\def\fdgrepeat(#1,#2)[#3]#4until#5{\fdghelpd=\fdgcol \fdghelpe=\fdgrow % Speichern
             \fdgcontrob                                     % kreis
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgpbl {#3}
             \fdghelpc = #2 \fdglinedown {#3} 
             \fdgcol = \fdghelpd
             \fdgrow = \fdghelpe \advance\fdgrow  by -#2
             \advance\fdgrow  by -1
             \fdgiftbr{#5} 
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgptl {#3}
             \fdgcol=\fdghelpd \fdgrow=\fdghelpe \advance\fdgrow by -1 
             {#4}
             \fdgcol=\fdghelpd \fdgrow=\fdghelpe \advance\fdgrow by -2 
             \advance\fdgrow by -#2 
             }
%
%
%
\long\def\fdgwhiledo(#1,#2)[#3]#4#5{\fdghelpd=\fdgcol \fdghelpe=\fdgrow % Speichern
             \fdgcontrob                                      % kreis
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgpbl{#3}
             \fdghelpc = #2 \advance \fdghelpc by 1 \fdglinedown  {#3}
             \fdgcol = \fdghelpd
             \fdgrow = \fdghelpe \advance\fdgrow  by -#2
             \advance\fdgrow  by -2
             \fdgtr 
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgptl{#3}
             \fdgcol=\fdghelpd \fdgrow=\fdghelpe \advance\fdgrow by -1 
             \fdgiftbl{#4} 
             {#5}
             \fdgcol = \fdghelpd
             \fdgrow = \fdghelpe
             \advance \fdgcol by -2
             \advance \fdgrow by -1 }

%
%---------------------------------------------------------------------------
%
\long\def\fdgifthen(#1,#2)[#3]#4#5{\fdghelpd=\fdgcol \fdghelpe=\fdgrow % Speichern
             \fdgiftbr{#4}
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgpbl {#3}
             \fdghelpc = #2 \fdglinedown {#3} 
             \fdgcol = \fdghelpd
             \fdgrow = \fdghelpe \advance\fdgrow  by -#2
             \advance\fdgrow  by -1
             \fdgcontrob                                     % kreis
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgptl {#3}
             \fdgcol=\fdghelpd \fdgrow=\fdghelpe \advance\fdgrow by -1 
             {#5}     
             \fdgcol=\fdghelpd 
             \fdgrow=\fdghelpe
             \advance\fdgrow by -2
             \advance\fdgrow by -#2}
%
%
%
%---------------------------------------------------------------------------
%
\long\def\fdgifelse(#1,#2)#3#4#5{\fdghelpd=\fdgcol \fdghelpe=\fdgrow % Speichern
             \fdgiftbr{#3} 
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgbl
             {#5}
             \fdgcol = \fdghelpd
             \fdgrow = \fdghelpe \advance\fdgrow  by -#2
             \advance\fdgrow  by -1
             \fdgcol=\fdghelpd \fdgrow=\fdghelpe \advance\fdgrow by -1 
             {#4}  
             \fdgcol=\fdghelpd \fdgrow=\fdghelpe \advance\fdgrow by -1 
             \advance\fdgrow by -#2 
             \fdgcontrob                                     
             \advance\fdgcol by 2 \advance \fdgrow by 1
             \fdghelpc = #1 \fdglineleft 
             \fdgtl \advance\fdgcol by -#1 \advance \fdgcol by -#1}
%
%
%
%
\def\fdgleft{\advance\fdgcol by -2\advance\fdgrow by 1}
\def\fdgright{\advance\fdgcol by 2\advance\fdgrow by 1}
\def\fdgup#1{\advance\fdgcol by 2\advance\fdgrow by #1
                 \advance\fdgrow by 1}
%
