summaryrefslogtreecommitdiff
path: root/support/flow/flowdoc.tex
blob: 9a0e7469b164a160fcf1cfa82f56a26774b865a3 (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
% flowdoc.tex - a fairly plain LaTeX file, documentation for 'flow'
% created 15 Nov 1992, by Terry Brown
% last revised 2004-2-18

\documentstyle{article}

\setlength{\unitlength}{2em} % for the picture environment

\setlength{\parindent}{0pt}
\setlength{\parskip}{2ex}
\addtolength{\topmargin}{-1cm}
\addtolength{\textheight}{2cm}
\addtolength{\evensidemargin}{-1cm}
\addtolength{\oddsidemargin}{-1cm}
\addtolength{\textwidth}{2cm}
% 4 levels of headings
\newcommand{\headA}[1]{{\huge \vspace{1ex} \bf \hfill #1 \vspace{1ex}\hfill}}
\newcommand{\headB}[1]{{\Large \vspace{1ex} \bf #1 \vspace{1ex} }}
\newcommand{\headC}[1]{{\large \vspace{1ex} \bf #1 \vspace{1ex} }}
\newcommand{\headD}[1]{{\bf \vspace{1ex} #1 \vspace{1ex} }}

\newcommand{\pushin}{\hspace*{1em}}

\begin{document}

\title{Flow -- a program to generate flowcharts in the \LaTeX\
       picture environment}
\author{Terry Brown}
\date{November 25, 1992 --- September 22, 2005}
\maketitle

\headB{Summary}

{\em Flow\/} is a small program which parses the flowchart description
explained in this document and translates it to the \LaTeX\ picture
environment.

Flow acts as a filter, so a typical execution would be...

\verb+flow +$<$\verb+myprog.flo +$>$\verb+myprog.pic+

...where \verb+myprog.flo+ is a plain text file containing a description of a
flowchart, and \verb+myprog.pic+ will be a plain text file containing the
body of a \LaTeX\ picture environment to draw the flowchart.  Alternatively

\verb+flow inputFile   + or \verb+   flow inputFile outputFile+

may be used.  VMS users see notes at end.

\verb+myprog.pic+ could either be inserted into a picture environment in a
\LaTeX\ file with a text editor, or pulled in by the \verb+\input+ command as
\LaTeX\ is run.

\headB{System requirements}

Nothing in particular.  Flow is in very plain C and should be portable to
pretty much anything without alteration.  Check beginning of file for defines
if it gives trouble.

\headB{Distribution and Bug Reports}

Flow is free software covered by the GPL.  See the file \verb+COPYING+
for details.  Email to \verb+terry_n_brown@yahoo.com+ with bug reports
etc.

\newpage
\headB{Flowchart description syntax}

\verb+[indented text]+ indicates the command accepts zero or more line of
text, these lines are identified by indentation.  All lines after the command
starting with either a space or a tab are assumed to be text for that
command.  The first line not starting with one of these characters is assumed
to be the next command.  Distributed code / executeables are case
insensitive, but local compilations may vary.

The flowchart is always ``going'' either up, down, left or right.  The
initial direction is down.

The flowchart description file is terminated either by an invalid command,
a blank line, or the end of the file.  Keywords are case sensitive.

% This bit became redundant with v 0.99
%
%% The output from flow should appear inside a \LaTeX\ picture environment.
%% Use
%% 
%% \pushin\verb+\begin{picture}(x,y)(0,-y)+
%% 
%% to start the environment (as the flow
%% chart starts at 0,0 and normally goes down, this put the pictures origin at
%% the top left corner).  10 and 10 are ok as initial values for x and y.  The
%% positioning of the picture can be adjusted with the second pair as usual for
%% the picture environment.

The output from flow will appear inside a \LaTeX\ picture environment.
The positioning of the picture can be adjusted with the second pair as usual
for the picture environment.

\verb+\unitlength+ should be set for use with the picture environment, all
the examples in this document use \verb+2em+ (ie. put
\verb+\setlength{\unitlength}{2em}+ at the top of the \LaTeX\ file).
Smaller values make the boxes tighter around the text, larger values make
them more open.

\headC{The commands}

\verb_% comment to end of line_

If the first thing on a line is a '\verb_%_' symbol the line is
treated as a comment.  Thanks to Joost Bruynooghe for adding this command.

\begin{verbatim}
Box [x y]
  [indented text]
\end{verbatim}

Draws a text at the current position, including a line or arrow leading to it
if appropriate.  If x and y are specified, the size of the box (in
\verb+\unitlength+s), and all subsequent boxes, is set to these.  The
default size of a box is 4 by 2 \verb+\unitlength+s.

{\small
\begin{verbatim}
Right
Box
  This is
  the first
  box.
Box 8 1
  And this is the second
\end{verbatim}
}

\begin{picture}(10,2)(0,-2)
% picture environment flowchart generated by flow 0.95
\put(0.0000,-2.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
This is   \\
the first \\
box.
}}}
\put(4.0000,-1.0000){\vector(1,0){1.0000}}
\put(5.0000,-1.5000){\framebox(8.0000,1.0000)[c]{\shortstack[c]{
And this is the second
}}}
\end{picture}

\newpage
\begin{verbatim}
Oval [x y]
  [indented text]

Tilt [x y]
  [indented text]

Text [x y]
  [indented text]
\end{verbatim}

\verb+Oval+, \verb+Tilt+ and \verb+Text+ are identical to \verb+Box+, except
for the shape of the frame.  (\verb+Text+ is an invisible frame.)

{\small
\begin{verbatim}
Right
Oval
  This is
  an Oval
Tilt
  And this
  is a
  Tilt
Text
  And this
  is a
  Text
\end{verbatim}
}

\begin{picture}(10,3)(0,-3)
% picture environment flowchart generated by flow 0.95
\put(2.0000,-1.0000){\oval(4.0000,2.0000)}
\put(0.0000,-2.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
This is   \\
an Oval
}}}
\put(4.0000,-1.0000){\vector(1,0){1.0000}}
\put(5.0000,-2.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
And this \\
is a     \\
Tilt
}}}
\put(5.3333,0.0000){\line(1,0){4.0000}}
\put(4.6667,-2.0000){\line(1,0){4.0000}}
\put(4.6667,-2.0000){\line(1,3){0.6667}}
\put(8.6667,-2.0000){\line(1,3){0.6667}}
\put(9.0000,-1.0000){\vector(1,0){1.0000}}
\put(10.0000,-2.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
And this \\
is a     \\
Text
}}}
\end{picture}

\begin{verbatim}
Choice A B C D [x y]
  [indented text]
\end{verbatim}

Draws a choice diamond, with the corners labeled as illustrated by the left
diamond in the example.  Periods (.) are not printed.  The optional x an y
parameters alter the size of the choice.  The default size is 4 by 4
\verb+\unitlengh+s.  Flow will report an error for non-square choice boxes
whose aspect ratio doesn't match one of the line slopes supported by \LaTeX\
(-6 -- 6 : -6 -- 6, integers only).

{\small
\begin{verbatim}
Right
Choice A B C D
  Label
  any
  corner
Choice Yes . No .
  Normally
  only two.
\end{verbatim}
}

\begin{picture}(10,5)(0,-5)
% picture environment flowchart generated by flow 0.95
\put(0.0000,-2.0000){\line(1,1){2.0000}}
\put(0.0000,-2.0000){\line(1,-1){2.0000}}
\put(4.0000,-2.0000){\line(-1,-1){2.0000}}
\put(4.0000,-2.0000){\line(-1,1){2.0000}}
\put(0.0000,-4.0000){\makebox(4.0000,4.0000)[c]{\shortstack[c]{
Label\\
any\\
corner
}}}
\put(2.6000,0.0000){\makebox(0,0)[lt]{A}}
\put(0.0000,-1.4000){\makebox(0,0)[rt]{B}}
\put(4.0000,-1.4000){\makebox(0,0)[lt]{C}}
\put(2.6000,-4.0000){\makebox(0,0)[lb]{D}}
\put(4.0000,-2.0000){\vector(1,0){1.0000}}
\put(5.0000,-2.0000){\line(1,1){2.0000}}
\put(5.0000,-2.0000){\line(1,-1){2.0000}}
\put(9.0000,-2.0000){\line(-1,-1){2.0000}}
\put(9.0000,-2.0000){\line(-1,1){2.0000}}
\put(5.0000,-4.0000){\makebox(4.0000,4.0000)[c]{\shortstack[c]{
Normally\\
only two.
}}}
\put(7.6000,0.0000){\makebox(0,0)[lt]{Yes}}
\put(9.0000,-1.4000){\makebox(0,0)[lt]{No}}
\end{picture}

\verb+SetTrack none | arrow | line+

Use arrows, lines, or nothing for drawing connections between boxes.

\verb+TxtPos P1 P2 [B [A]]+

\verb+P1+ is the \LaTeX\ position specification (eg. [c] or [l]) for the
lines of text that makes up the blocks of text in the boxes, \verb+P2+ is
the \LaTeX\ position specification for the whole block of text within the
box.  \verb+B+ is the string (no white space) to be placed before each line
of text, \verb+A+ is the string to be placed after each line of text.  The
example shows the use of \verb+B+ to keep text off the edge of the box.

{\small
\begin{verbatim}
Right
SetTrack arrow
TxtPos [l] [l]
Box 3.5 2
  Needs some
  space on the
  left
TxtPos [l] [l] ~
Box
  Left justified
  text with
  space
SetTrack line
TxtPos [c] [c]
Box
  Centred
  Text
SetTrack none
TxtPos [r] [r] ~ \hspace*{1ex}
Box
  Right justified
  Text
\end{verbatim}
}

\begin{picture}(10,3)(0,-2.5)
% picture environment flowchart generated by flow 0.95
\put(0.0000,-2.0000){\framebox(3.5000,2.0000)[l]{\shortstack[l]{
Needs some\\
space on the\\
left
}}}
\put(3.5000,-1.0000){\vector(1,0){1.0000}}
\put(4.5000,-2.0000){\framebox(3.5000,2.0000)[l]{\shortstack[l]{
~Left justified\\
~text with\\
~space
}}}
\put(8.0000,-1.0000){\line(1,0){1.0000}}
\put(9.0000,-2.0000){\framebox(3.5000,2.0000)[c]{\shortstack[c]{
Centred\\
Text
}}}
\put(13.5000,-2.0000){\framebox(3.5000,2.0000)[r]{\shortstack[r]{
~Right justified\hspace*{1ex}\\
~Text\hspace*{1ex}
}}}
\end{picture}

\newpage
\verb+Tag+

\verb+ToTag+

\verb+Tag+ stores the location and size of the last object drawn on a stack,
\verb+ToTag+ returns to that position (removing the item from the stack).  This is
particularly useful with \verb+Choice+s, allowing a second chain to be built
from the diamond, but it can be used with any other item.  Flow will complain
if it encounters more \verb+ToTag+s the \verb+Tag+s, but won't mention
\verb+Tag+s left on the stack when it finishes.

{\small
\begin{verbatim}
Right 0
Choice . . N Y
  Ready to
  stop?
Tag
Choice . . Right Down
  Go right
  or Down?
Tag
Right 1
Box
  To the
  right
ToTag
Down
Box
  Down here
ToTag
Down
Oval
  STOP
\end{verbatim}
}

\begin{picture}(10,7)(0,-5)
% picture environment flowchart generated by flow 0.95
\put(0.0000,0.0000){\line(1,0){0.0000}}
\put(0.0000,0.0000){\vector(1,0){1.0000}}
\put(1.0000,0.0000){\line(1,1){2.0000}}
\put(1.0000,0.0000){\line(1,-1){2.0000}}
\put(5.0000,0.0000){\line(-1,-1){2.0000}}
\put(5.0000,0.0000){\line(-1,1){2.0000}}
\put(1.0000,-2.0000){\makebox(4.0000,4.0000)[c]{\shortstack[c]{
Ready to\\
stop?
}}}
\put(5.0000,0.6000){\makebox(0,0)[lt]{N}}
\put(3.6000,-2.0000){\makebox(0,0)[lb]{Y}}
\put(5.0000,0.0000){\vector(1,0){1.0000}}
\put(6.0000,0.0000){\line(1,1){2.0000}}
\put(6.0000,0.0000){\line(1,-1){2.0000}}
\put(10.0000,0.0000){\line(-1,-1){2.0000}}
\put(10.0000,0.0000){\line(-1,1){2.0000}}
\put(6.0000,-2.0000){\makebox(4.0000,4.0000)[c]{\shortstack[c]{
Go right\\
or Down?
}}}
\put(10.0000,0.6000){\makebox(0,0)[lt]{Right}}
\put(8.6000,-2.0000){\makebox(0,0)[lb]{Down}}
\put(10.0000,0.0000){\line(1,0){1.0000}}
\put(11.0000,0.0000){\vector(1,0){1.0000}}
\put(12.0000,-1.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
To the\\
right
}}}
\put(8.0000,-2.0000){\vector(0,-1){1.0000}}
\put(6.0000,-5.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Down here
}}}
\put(3.0000,-2.0000){\vector(0,-1){1.0000}}
\put(3.0000,-4.0000){\oval(4.0000,2.0000)}
\put(1.0000,-5.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
STOP
}}}
\end{picture}

\newpage
\begin{verbatim}
Up    [d [*]]
Down  [d [*]]
Left  [d [*]]
Right [d [*]]
\end{verbatim}

With or without the optional parameter, these command change the current
direction of the flowchart.  With the optional parameter, they draw a line,
if \verb+SetTrack+ is \verb+line+ {\em or\/} \verb+arrow+, or leave a gap, if
\verb+SetTrack+ in \verb+none+.  The length of the line (or gap) is $d$.  By
default \verb+Box+es, \verb+Oval+s, \verb+Tilt+s and \verb+Text+s are 4 units
wide and 2 units high.  A \verb+Choice+ is 4 by 4 units.  The arrows that
connect things together are 1 unit.  So a box drawn while the current
direction is down would occupy 2 + 1 = 3 vertical units.

To force the line to end in a arrow head, use the ``*'', which must be
separated from the ``d'' by a space.

{\small
\begin{verbatim}
Right 1
Box
  Flowing
  along.
Right 1
Tag
Down 2
Left 6
Up 2 *
ToTag
Right 3
Down
Oval
  STOP
\end{verbatim}
}

\begin{picture}(10,4)(0,-3)
% picture environment flowchart generated by flow 0.95
\put(0.0000,0.0000){\line(1,0){1.0000}}
\put(1.0000,0.0000){\vector(1,0){1.0000}}
\put(2.0000,-1.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Flowing \\
along.
}}}
\put(6.0000,0.0000){\line(1,0){1.0000}}
\put(7.0000,0.0000){\line(0,-1){2.0000}}
\put(7.0000,-2.0000){\line(-1,0){6.0000}}
\put(1.0000,-2.0000){\vector(0,1){2.0000}}
\put(7.0000,0.0000){\line(1,0){3.0000}}
\put(10.0000,0.0000){\vector(0,-1){1.0000}}
\put(10.0000,-2.0000){\oval(4.0000,2.0000)}
\put(8.0000,-3.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
STOP
}}}
\end{picture}

\verb+Scale x y+

Scale the {\em next\/} item by the specified values

{\small
\begin{verbatim}
Right
Oval
  Normal
  Oval
Scale 2 1
Box
  A smaller oval is a better stop
Scale 0.5 0.5
Oval
  STOP
\end{verbatim}
}

\begin{picture}(10,3)(0,-3)
% picture environment flowchart generated by flow 0.95
\put(2.0000,-1.0000){\oval(4.0000,2.0000)}
\put(0.0000,-2.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
Normal\\
Oval
}}}
\put(4.0000,-1.0000){\vector(1,0){1.0000}}
\put(5.0000,-2.0000){\framebox(8.0000,2.0000)[c]{\shortstack[c]{
A smaller oval is a better stop
}}}
\put(13.0000,-1.0000){\vector(1,0){1.0000}}
\put(15.0000,-1.0000){\oval(2.0000,1.0000)}
\put(14.0000,-1.5000){\makebox(2.0000,1.0000)[c]{\shortstack[c]{
STOP
}}}
\end{picture}

\begin{verbatim}
Skip x0 y0 x1 x1
\end{verbatim}

\begin{tabular}{r@{~~}p{4in}}
\tt x0 & Horizontal separation between boxes, default 1 \verb+\unitlength+ \\
\tt y0 & Vertical separation between boxes, default 1 \verb+\unitlength+ \\
\tt x1 & Multiplier for \verb+Left+ and \verb+Right+ commands, default 1 \\
\tt y1 & Multiplier for \verb+Up+ and \verb+Down+ commands, default 1 \\
\end{tabular}

{\small
\begin{verbatim}
Skip 0 0 1 1
SetTrack none
Box
  After this
  Box
Box
  Is another
  with no
  gap
SetTrack arrow
Right 5
Up 1 *
Left 1 *
Down 1 *
Right 1 *
Skip 0 0 3 3
Up 1 *
Left 1 *
Down 1 *
Right 1 *
\end{verbatim}
}

\begin{picture}(10,5)(0,-5)
% picture environment flowchart generated by flow 0.95
\put(0.0000,-2.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
After this\\
Box
}}}
\put(0.0000,-4.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Is another\\
with no\\
gap
}}}
\put(4.0000,-3.0000){\line(1,0){5.0000}}
\put(9.0000,-3.0000){\vector(0,1){1.0000}}
\put(9.0000,-2.0000){\vector(-1,0){1.0000}}
\put(8.0000,-2.0000){\vector(0,-1){1.0000}}
\put(8.0000,-3.0000){\vector(1,0){1.0000}}
\put(9.0000,-3.0000){\vector(0,1){3.0000}}
\put(9.0000,0.0000){\vector(-1,0){3.0000}}
\put(6.0000,0.0000){\vector(0,-1){3.0000}}
\put(6.0000,-3.0000){\vector(1,0){3.0000}}
\end{picture}

\newpage
\headB{VMS notes}

I don't know much VMS, but this is one way of getting it to work.  Compile
and link as normal, then

{\tt flow :== \$\fbox{\$1\$DIA3:}[brownt1.usr.flow]flow.exe}

where the bit in the box is the name of the drive you're working on, and
\verb+[brownt1.usr.flow]+ is the appropriate path.  Then use the 

\verb+flow infile outfile+

form, as the redirection form doesn't seem to work.

\newpage
\headB{An example}

The instructions that generated this flow chart are included in
a commented section in \verb+flowdoc.tex+.  Note the block of text is part of
the picture environment (a \verb+Text+).

% THIS IS THE FLOW DATA FOR THE EXAMPLE AT THE END
% Box
%   Initialise
%   st
% Oval
%   Begin
%   RootParse
% Tag
% Box
%   Initialise
%   A \& B
% Down 1
% Box
%   Call client
%   with A, B \& st
% Choice . . Y N
%   Is B a
%   New-Root
%   Node?
% Tag
% Down 1
% Choice . . Y N
%   Is B a
%   Fungi
%   Node?
% Tag
% Down 1
% Choice . N . Y
%   Is B the
%   Current-End
%   Node?
% Tag
% Oval
%   Return
% ToTag
% Left 3
% Up 2
% Box
%   Update
%   direction
%   data in st
% Box
%   A = B
%   B = B.next
% Up 10
% Right 5 *
% ToTag
% Right 1
% Box
%   Adjust fungi
%   values in st
% Down 2
% Left 6 *
% ToTag
% Right
% Box
%   Increment
%   st order
% Tilt
%   Recursively
%   call RootParse
% Box
%   Decrement
%   st order
% Down 2
% Left 15 *
% ToTag
% SetTrack none
% Down 2
% Right 8
% TxtPos [l] [c]
% Text
%   A and B are the node records at the
%   start and end of the internode being
%   processed.  `st' is a record containing
%   information about the current fungal
%   population, position in 3-space, root 
%   order etc.  It is cloned during the 
%   recursive descent.

\scriptsize
\setlength{\unitlength}{1.8em}
%% start of flow output
\begin{picture}(24.000000,32.000000)(-5.000000,-32.000000)
% picture environment flowchart generated by flow 0.99e
\put(0.0000,-2.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Initialise\\
st
}}}
\put(2.0000,-2.0000){\vector(0,-1){1.0000}}
\put(2.0000,-4.0000){\oval(4.0000,2.0000)}
\put(0.0000,-5.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
Begin\\
RootParse
}}}
\put(2.0000,-5.0000){\vector(0,-1){1.0000}}
\put(0.0000,-8.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Initialise\\
A \& B
}}}
\put(2.0000,-8.0000){\line(0,-1){1.0000}}
\put(2.0000,-9.0000){\vector(0,-1){1.0000}}
\put(0.0000,-12.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Call client\\
with A, B \& st
}}}
\put(2.0000,-12.0000){\vector(0,-1){1.0000}}
\put(0.0000,-15.0000){\line(1,1){2.0000}}
\put(0.0000,-15.0000){\line(1,-1){2.0000}}
\put(4.0000,-15.0000){\line(-1,-1){2.0000}}
\put(4.0000,-15.0000){\line(-1,1){2.0000}}
\put(0.0000,-17.0000){\makebox(4.0000,4.0000)[c]{\shortstack[c]{
Is B a\\
New-Root\\
Node?
}}}
\put(4.0000,-14.4000){\makebox(0,0)[lt]{Y}}
\put(2.6000,-17.0000){\makebox(0,0)[lb]{N}}
\put(2.0000,-17.0000){\line(0,-1){1.0000}}
\put(2.0000,-18.0000){\vector(0,-1){1.0000}}
\put(0.0000,-21.0000){\line(1,1){2.0000}}
\put(0.0000,-21.0000){\line(1,-1){2.0000}}
\put(4.0000,-21.0000){\line(-1,-1){2.0000}}
\put(4.0000,-21.0000){\line(-1,1){2.0000}}
\put(0.0000,-23.0000){\makebox(4.0000,4.0000)[c]{\shortstack[c]{
Is B a\\
Fungi\\
Node?
}}}
\put(4.0000,-20.4000){\makebox(0,0)[lt]{Y}}
\put(2.6000,-23.0000){\makebox(0,0)[lb]{N}}
\put(2.0000,-23.0000){\line(0,-1){1.0000}}
\put(2.0000,-24.0000){\vector(0,-1){1.0000}}
\put(0.0000,-27.0000){\line(1,1){2.0000}}
\put(0.0000,-27.0000){\line(1,-1){2.0000}}
\put(4.0000,-27.0000){\line(-1,-1){2.0000}}
\put(4.0000,-27.0000){\line(-1,1){2.0000}}
\put(0.0000,-29.0000){\makebox(4.0000,4.0000)[c]{\shortstack[c]{
Is B the\\
Current-End\\
Node?
}}}
\put(0.0000,-26.4000){\makebox(0,0)[rt]{N}}
\put(2.6000,-29.0000){\makebox(0,0)[lb]{Y}}
\put(2.0000,-29.0000){\vector(0,-1){1.0000}}
\put(2.0000,-31.0000){\oval(4.0000,2.0000)}
\put(0.0000,-32.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
Return
}}}
\put(0.0000,-27.0000){\line(-1,0){3.0000}}
\put(-3.0000,-27.0000){\line(0,1){2.0000}}
\put(-3.0000,-25.0000){\vector(0,1){1.0000}}
\put(-5.0000,-24.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Update\\
direction\\
data in st
}}}
\put(-3.0000,-22.0000){\vector(0,1){1.0000}}
\put(-5.0000,-21.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
A = B\\
B = B.next
}}}
\put(-3.0000,-19.0000){\line(0,1){10.0000}}
\put(-3.0000,-9.0000){\vector(1,0){5.0000}}
\put(4.0000,-21.0000){\line(1,0){1.0000}}
\put(5.0000,-21.0000){\vector(1,0){1.0000}}
\put(6.0000,-22.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Adjust fungi\\
values in st
}}}
\put(8.0000,-22.0000){\line(0,-1){2.0000}}
\put(8.0000,-24.0000){\vector(-1,0){6.0000}}
\put(4.0000,-15.0000){\vector(1,0){1.0000}}
\put(5.0000,-16.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Increment\\
st order
}}}
\put(9.0000,-15.0000){\vector(1,0){1.0000}}
\put(10.0000,-16.0000){\makebox(4.0000,2.0000)[c]{\shortstack[c]{
Recursively\\
call RootParse
}}}
\put(10.3333,-14.0000){\line(1,0){4.0000}}
\put(9.6667,-16.0000){\line(1,0){4.0000}}
\put(9.6667,-16.0000){\line(1,3){0.6667}}
\put(13.6667,-16.0000){\line(1,3){0.6667}}
\put(14.0000,-15.0000){\vector(1,0){1.0000}}
\put(15.0000,-16.0000){\framebox(4.0000,2.0000)[c]{\shortstack[c]{
Decrement\\
st order
}}}
\put(17.0000,-16.0000){\line(0,-1){2.0000}}
\put(17.0000,-18.0000){\vector(-1,0){15.0000}}
\put(11.0000,-8.0000){\makebox(4.0000,2.0000)[c]{\shortstack[l]{
A and B are the node records at the\\
start and end of the internode being\\
processed.  `st' is a record containing\\
information about the current fungal\\
population, position in 3-space, root \\
order etc.  It is cloned during the \\
recursive descent.
}}}
\end{picture}

%% end of flow output

\end{document}