top - download
⟦811471820⟧ Wang Wps File
Length: 7018 (0x1b6a)
Types: Wang Wps File
Notes: SW Doc. Std. App. C
Names: »0278A «
Derivation
└─⟦e91c96c30⟧ Bits:30006069 8" Wang WCS floppy, CR 0025A
└─ ⟦this⟧ »0278A «
WangText
…02…SD/STD/008
…02…SVO/801027…02……02…C-#
SOFTWARE MODULE DOCUMENTATION STANDARD
…02……02…GENERAL
A̲P̲P̲E̲N̲D̲I̲X̲ ̲C̲
C.1 G̲E̲N̲E̲R̲A̲L̲
a) The following definition of Flowgrams shall be
used to describe the logic flow in software modules.
A flowgram drawn in accordance to this definition
is completely equivalent to a traditional flowchart
but has the great advantage of using simpler symbols
making it possible to utilize word processing equipment
in production of the software documentation.
C.2 S̲Y̲M̲B̲O̲L̲S̲ ̲F̲O̲R̲ ̲C̲O̲N̲T̲R̲O̲L̲ ̲S̲T̲R̲U̲C̲T̲U̲R̲E̲S̲
The symbols to be used in flowgrams are as follows,
beginning with the 3 simple control structures defined
in structured design.
a) Sequence
Start
Read input
Perform calculation
Write results
Stop
The program steps each described in a few words
are simply listed below each other aligned with
the left margin of the paper. The processing is
asumed to always proceed from the top to the bottom
of the list, making arrows superfluous.
The main difference from a flowchart is that boxes
around the step descriptions are omitted.
b) Loops
read input
calculation loop:
calculate
refine
accuracy met? EXIT calculation
End calculation loop
write results
The steps of the loop body are treated exactly
as any other part of the program with the only
difference that they are indented 4 character positions
to the right.
To clarify the beginning and end of a loop it is
enclosed in loop "brackets" consisting of the words
"loop" and "end loop". Further a label may be attached
to the loop as shown in example. This label should
be placed in both ends of the loop.
The symbol EXIT is used to define the exitpoint
of the loop. This symbol may also have the loop
level attached.
It is always assumed that after an exit,the execution
resumes at the end of the loop.
Loops may be nested in as many levels as the clarity
of the flowgrams permits. In nested loops the loop
labels are especially useful in clarifying the
position of each level. Further it is possible
to specify exit from several levels by means of
the loop label.
c) Branching (binary)
read input
inp.correct? move data, calculate, store result
̲
write error message
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲
continue
The sysmbol "?" (question mark) is used to define
a program step as a branching point. The branching
point is characterized by a condition which will
be either true or false, and the continuing of
execution depends on this value. In a flowgram
we limit the necessity of arrows in this situation
by defining that a true condition leads to execution
of the horizontal branch and a false condition
means that execution will proceed along the vertical
line. From the end of the horizontal (true) branch
an arrow leads to the point where the branches
join again, indicating that if this path is followed
the steps on the vertical (false branch between
the condition and the joint is bypassed.
d) Branching (multiple)
read color
case color:
red? - perform red procedure ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲
blue? - perform blue procedure ̲ ̲ ̲
̲ ̲ ̲ ̲
yellow? - perform yellow procedure ̲
̲ ̲ ̲
end color case
set error
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲
continue
At a brancing point several choises may exist where
each leads to a separate path to be followed. This
situation can be graphically described by a case
construction as shown above. The choises are listed
below each other indented 4 character positions
and surrounded by case "brackets" consisting of
"case" and "end case". The case may be supplied
with a label in order to clarify its bounds.
C.3 O̲T̲H̲E̲R̲ ̲S̲Y̲M̲B̲O̲L̲S̲
a) U̲s̲e̲ ̲o̲f̲ ̲P̲a̲r̲a̲n̲t̲h̲e̲s̲e̲s̲
Flowgrams can be simplified by combining multiple
tests or several sequential steps with parentheses.
Example 1 below tends to become too crowded with
small processes and can be made more clear by combining
some of them as shown in example 2.
CASH SALE?-ENOUGH CASH?-DO SALE ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲
REFUSE SALE
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
CHECK? ̲ ̲ ̲ ̲ ̲CHECK OK?-DO SALE ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲
…02……02… REFUSE SALE
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
CHARGE? ̲ ̲ ̲ ̲CREDIT OK?-DO SALE ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲
PAST CREDIT GOOD?-DO SALE ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
MANAGER'S APPROVAL?-DO SALE ̲ ̲ ̲ ̲ ̲
REFUSE SALE
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲
CASH SALE
AND ENOUGH CASH
OR ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲DO SALE ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲
CHECK
…02……02…AND CHECK GOOD
CHARGE? ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲CREDIT OK
OR
PAST RECORD GOOD ? ̲ ̲ ̲DO SALE
̲ ̲ ̲ ̲
OR
…02……02……02……02… MANAGERS APPROVAL
REFUSE SALE
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲ ̲
̲ ̲ ̲ ̲ ̲ ̲
b) F̲u̲r̲t̲h̲e̲r̲ ̲B̲r̲e̲a̲k̲d̲o̲w̲n̲s̲
Some of the steps in a flowgram may represent processes
which are in themself rather complicated and needs
further breakdown in another flowgram. This can
be shown in a flowgram by underlining the description
of the step and follow it by a parentheses containing
a reference to the lower level flowchart.
move data
c̲a̲l̲c̲u̲l̲a̲t̲e̲ ̲s̲a̲l̲a̲r̲y̲ ̲(̲3̲.̲2̲.̲1̲)̲
print sum
c) C̲o̲m̲m̲e̲n̲t̲s̲
Comments may be included in a flowgram enclosed
in "comment brackets" for example:
"This is a comment"
As the actual symbol used to identify a comment
is unimportant for the flowgram it is recommended
to use the same notation that is used in the programming
language to which the flowgram will later be translated.
This will ease the job for the programmer.
d) S̲i̲z̲e̲
In order to preserve visibility a flowgram may
never exceed one sheet of paper (although fold
out pages may be used).
Large flowgrams shall be broken down into several
levels using the structure described in b).
e) S̲u̲m̲m̲a̲r̲y̲ ̲o̲f̲ ̲S̲y̲m̲b̲o̲l̲s̲
- vertical and horizontal lines connect succesive
steps of the process
, commas separate steps on horizontal lines
- An arrow indicates the junction of two
branches
Symbol indicates the exit point in a loop
? Indicates a condition controlling a branch
Large Parentheses combines several processes
" " or other symbol indicates comments
x̲x̲x̲(̲a̲b̲) underlining indicates reference to lower
level diagram.