home *** CD-ROM | disk | FTP | other *** search
-
-
- _____________________________________________________________________________
-
- ! !
-
- ! This is the file >>structur.spe<< from the public domain !
-
- ! version of »SPE«. !
-
- ! !
-
- ! This is a structogram for showing the elements of a structogram. !
-
- ! !
-
- ! There are only a few structuring elements which build a structogram: !
-
- ! !
-
- ! Sequence !
-
- ! Inclusion !
-
- ! Branch !
-
- ! Case !
-
- ! Loop !
-
- ! !
-
- ! Each of these elements is build of blocks. Each block is a block !
-
- ! or a pseudoblock. A block can be divided with the five basic !
-
- ! elements into smaller blocks. A pseudoblock cannot be further !
-
- ! divided. Look at the following part which shows the blocktypes. !
-
- ! They are explained with words afterwards. !
-
- ! !
- _____________________________________________________________________________
-
- ! !
-
- ! Sequence !
- _____________________________________________________________________________
-
- ! Statement !
-
- ! Statement !
-
- ! Statement !
-
- ! Statement !
- _____________________________________________________________________________
-
- ! !
-
- ! Loop !
- _____________________________________________________________________________
-
- ! Condition !
-
- ! (Pseudoblock) !
- __________________________________________________________________________
-
- ! ! !
-
- ! ! Block !
-
- ! ! !
- _____________________________________________________________________________
-
- ! !
-
- ! Inclusion !
- _____________________________________________________________________________
-
- ! Upper block !
-
- ! (Pseudoblock) !
- __________________________________________________________________________
-
- ! ! !
-
- ! ! Lower block !
-
- ! ! !
- __________________________________________________________________________
-
- ! !
- _____________________________________________________________________________
-
- ! !
-
- ! Branch !
- _____________________________________________________________________________
-
- ! Condition !
-
- ! (Pseudoblock) !
- _____________________________________________________________________________
-
- ! ! !
-
- ! Yes Block ! No Block !
-
- ! ! !
- _____________________________________________________________________________
-
- ! !
-
- ! Case !
- _____________________________________________________________________________
-
- ! Common Part of the Condition !
-
- ! (Pseudoblock) !
- _____________________________________________________________________________
-
- ! Case part ! Case part ! ! Case part ! !
-
- ! of the ! of the ! .... ! of the ! !
-
- ! Condition ! Condition ! ! Condition ! Else Block !
-
- ! (Pseudoblock) ! (Pseudoblock) ! ! (Pseudoblock) ! !
- ________________________________________________________
-
- ! ! ! ! ! !
-
- ! Block ! Block ! .... ! Block ! !
-
- ! ! ! ! ! !
- _____________________________________________________________________________
-
- ! !
-
- ! Compound !
- _____________________________________________________________________________
-
- ! !
-
- ! Block !
-
- ! !
- _____________________________________________________________________________
-
- ! !
-
- ! Block !
-
- ! !
- _____________________________________________________________________________
-
- ! !
-
- ! Block !
-
- ! !
- _____________________________________________________________________________
-
- ! !
-
- ! Block !
-
- ! !
- _____________________________________________________________________________
-
- ! !
-
- ! !
-
- ! Compound: !
-
- ! !
-
- ! The edges of the great block which surround the whole structogram is !
-
- ! an example for a compound. The compound is the most simple !
-
- ! structure element. A compound is a block containing blocks. !
-
- ! The blocks are worked through from the first to the last element !
-
- ! in the block. !
-
- ! !
-
- ! Sequence: !
-
- ! !
-
- ! A sequence is a sequence of statements. A compound is a sequence !
-
- ! of blocks. !
-
- ! !
-
- ! !
-
- ! Now an inclusion is following. !
-
- ! !
- _____________________________________________________________________________
-
- ! !
-
- ! The inclusion consists of a great block and a smaller block in it !
-
- ! with a common edge on the right side. We take all the other !
-
- ! elements into the smaller block of the inclusion. !
-
- ! !
- __________________________________________________________________________
-
- ! ! !
-
- ! ! The inclusion can be used for the declaration of procedures, !
-
- ! ! variables, constants ... in Pascal !
-
- ! ! and for writing subroutines in Basic. !
-
- ! ! The usage of an inclusion varies from language to language. !
-
- ! ! !
-
- ! ! Now a branch is following. !
-
- ! ! !
- __________________________________________________________________________
-
- ! ! !
-
- ! ! A branch consists of three blocks. Two blocks side by side and !
-
- ! ! the third on top of the two others. We are now in the block on !
-
- ! ! top. !
-
- ! ! !
-
- ! ! The branch is used for formulating control statements like !
-
- ! ! the if-statement. !
-
- ! ! The condition of an if has to be written into this block. !
-
- ! ! The left of the two lower blocks will be executed if !
-
- ! ! the condition is true. The lower right block will be !
-
- ! ! executed if the condition is false. !
-
- ! ! !
-
- ! ! We take all the following elements into the right lower block. !
-
- ! ! !
- __________________________________________________________________________
-
- ! ! ! !
-
- ! ! This block ! This block will be executed if the condition is false. !
-
- ! ! will be ! !
-
- ! ! executed ! A case is now following. !
-
- ! ! if the ! !
- _____________________________________________________________
-
- ! ! condition ! !
-
- ! ! is true. ! A case is build upon a branch. You can extend a branch !
-
- ! ! ! to a case. Put the cursor into one of the lower blocks !
-
- ! ! ! of a branch and choose the command case. There will !
-
- ! ! ! be build some other blocks. Please look at the !
-
- ! ! ! examples how the case is used and the blocks are !
-
- ! ! ! filled with text. !
-
- ! ! ! !
-
- ! ! ! The lower right block of a case is the else-block. !
-
- ! ! ! We take a loop in it. !
-
- ! ! ! !
- _____________________________________________________________
-
- ! ! ! ! ! ! !
- __________
-
- ! ! ! ! ! ! A loop consists of two blocks with two common !
-
- ! ! ! ! ! ! edges: the lower and the right egde are common. !
-
- ! ! ! ! ! ! !
-
- ! ! ! ! ! ! The condition for executing the lower block !
-
- ! ! ! ! ! ! will be placed in this block. !
-
- ! ! ! ! ! ! !
-
- ! ! ! ! ! ! You can also formulate a for-statement here. !
-
- ! ! ! ! ! ! !
- _________________________________________________
-
- ! ! ! ! ! ! ! !
-
- ! ! ! ! ! ! ! This block will be executed as long as the !
-
- ! ! ! ! ! ! ! condition is true or the for-statement is !
-
- ! ! ! ! ! ! ! active. !
-
- ! ! ! ! ! ! ! !
- __________________________________________________________________________
-
- ! !
- _____________________________________________________________________________
-
- 01.07.1987 01.07.1987 0001000F
-