home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / INFO / MISC / SPE.ZIP / STRUCTUR.PRT < prev    next >
Encoding:
Text File  |  1987-06-14  |  14.0 KB  |  151 lines

  1.                
  2.  
  3. _____________________________________________________________________________
  4.  
  5. !                                                                           !
  6.  
  7. ! This is the file >>structur.spe<< from the public domain                  !
  8.  
  9. ! version of »SPE«.                                                         !
  10.  
  11. !                                                                           !
  12.  
  13. ! This is a structogram for showing the elements of a structogram.          !
  14.  
  15. !                                                                           !
  16.  
  17. ! There are only a few structuring elements which build a structogram:      !
  18.  
  19. !                                                                           !
  20.  
  21. !    Sequence                                                               !
  22.  
  23. !    Inclusion                                                              !
  24.  
  25. !    Branch                                                                 !
  26.  
  27. !    Case                                                                   !
  28.  
  29. !    Loop                                                                   !
  30.  
  31. !                                                                           !
  32.  
  33. ! Each of these elements is build of blocks. Each block is a block          !
  34.  
  35. ! or a pseudoblock. A block can be divided with the five basic              !
  36.  
  37. ! elements into smaller blocks. A pseudoblock cannot be further             !
  38.  
  39. ! divided. Look at the following part which shows the blocktypes.           !
  40.  
  41. ! They are explained with words afterwards.                                 !
  42.  
  43. !                                                                           !
  44. _____________________________________________________________________________
  45.  
  46. !                                                                           !
  47.  
  48. ! Sequence                                                                  !
  49. _____________________________________________________________________________
  50.  
  51. !                        Statement                                          !
  52.  
  53. !                        Statement                                          !
  54.  
  55. !                        Statement                                          !
  56.  
  57. !                        Statement                                          !
  58. _____________________________________________________________________________
  59.  
  60. !                                                                           !
  61.  
  62. ! Loop                                                                      !
  63. _____________________________________________________________________________
  64.  
  65. !                        Condition                                          !
  66.  
  67. !                      (Pseudoblock)                                        !
  68.    __________________________________________________________________________
  69.  
  70. !  !                                                                        !
  71.  
  72. !  !                     Block                                              !
  73.  
  74. !  !                                                                        !
  75. _____________________________________________________________________________
  76.  
  77. !                                                                           !
  78.  
  79. ! Inclusion                                                                 !
  80. _____________________________________________________________________________
  81.  
  82. ! Upper block                                                               !
  83.  
  84. !                      (Pseudoblock)                                        !
  85.    __________________________________________________________________________
  86.  
  87. !  !                                                                        !
  88.  
  89. !  !                     Lower block                                        !
  90.  
  91. !  !                                                                        !
  92.    __________________________________________________________________________
  93.  
  94. !                                                                           !
  95. _____________________________________________________________________________
  96.  
  97. !                                                                           !
  98.  
  99. ! Branch                                                                    !
  100. _____________________________________________________________________________
  101.  
  102. !                        Condition                                          !
  103.  
  104. !                      (Pseudoblock)                                        !
  105. _____________________________________________________________________________
  106.  
  107. !                             !                                             !
  108.  
  109. !           Yes Block         !            No Block                         !
  110.  
  111. !                             !                                             !
  112. _____________________________________________________________________________
  113.  
  114. !                                                                           !
  115.  
  116. ! Case                                                                      !
  117. _____________________________________________________________________________
  118.  
  119. !                Common Part of the Condition                               !
  120.  
  121. !                      (Pseudoblock)                                        !
  122. _____________________________________________________________________________
  123.  
  124. ! Case part     ! Case part     !      ! Case part     !                    !
  125.  
  126. ! of the        ! of the        ! .... ! of the        !                    !
  127.  
  128. ! Condition     ! Condition     !      ! Condition     ! Else Block         !
  129.  
  130. ! (Pseudoblock) ! (Pseudoblock) !      ! (Pseudoblock) !                    !
  131. ________________________________________________________
  132.  
  133. !               !               !      !               !                    !
  134.  
  135. ! Block         ! Block         ! .... ! Block         !                    !
  136.  
  137. !               !               !      !               !                    !
  138. _____________________________________________________________________________
  139.  
  140. !                                                                           !
  141.  
  142. ! Compound                                                                  !
  143. _____________________________________________________________________________
  144.  
  145. !                                                                           !
  146.  
  147. !                        Block                                              !
  148.  
  149. !                                                                           !
  150. _____________________________________________________________________________
  151.  
  152. !                                                                           !
  153.  
  154. !                        Block                                              !
  155.  
  156. !                                                                           !
  157. _____________________________________________________________________________
  158.  
  159. !                                                                           !
  160.  
  161. !                        Block                                              !
  162.  
  163. !                                                                           !
  164. _____________________________________________________________________________
  165.  
  166. !                                                                           !
  167.  
  168. !                        Block                                              !
  169.  
  170. !                                                                           !
  171. _____________________________________________________________________________
  172.  
  173. !                                                                           !
  174.  
  175. !                                                                           !
  176.  
  177. ! Compound:                                                                 !
  178.  
  179. !                                                                           !
  180.  
  181. ! The edges of the great block which surround the whole structogram is      !
  182.  
  183. ! an example for a compound. The compound is the most simple                !
  184.  
  185. ! structure element. A compound is a block containing blocks.               !
  186.  
  187. ! The blocks are worked through from the first to the last element          !
  188.  
  189. ! in the block.                                                             !
  190.  
  191. !                                                                           !
  192.  
  193. ! Sequence:                                                                 !
  194.  
  195. !                                                                           !
  196.  
  197. ! A sequence is a sequence of statements. A compound is a sequence          !
  198.  
  199. ! of blocks.                                                                !
  200.  
  201. !                                                                           !
  202.  
  203. !                                                                           !
  204.  
  205. ! Now an inclusion is following.                                            !
  206.  
  207. !                                                                           !
  208. _____________________________________________________________________________
  209.  
  210. !                                                                           !
  211.  
  212. ! The inclusion consists of a great block and a smaller block in it         !
  213.  
  214. ! with a common edge on the right side. We take all the other               !
  215.  
  216. ! elements into the smaller block of the inclusion.                         !
  217.  
  218. !                                                                           !
  219.    __________________________________________________________________________
  220.  
  221. !  !                                                                        !
  222.  
  223. !  ! The inclusion can be used for the declaration of procedures,           !
  224.  
  225. !  ! variables, constants ... in Pascal                                     !
  226.  
  227. !  ! and for writing subroutines in Basic.                                  !
  228.  
  229. !  ! The usage of an inclusion varies from language to language.            !
  230.  
  231. !  !                                                                        !
  232.  
  233. !  ! Now a branch is following.                                             !
  234.  
  235. !  !                                                                        !
  236.    __________________________________________________________________________
  237.  
  238. !  !                                                                        !
  239.  
  240. !  ! A branch consists of three blocks. Two blocks side by side and         !
  241.  
  242. !  ! the third on top of the two others. We are now in the block on         !
  243.  
  244. !  ! top.                                                                   !
  245.  
  246. !  !                                                                        !
  247.  
  248. !  ! The branch is used for formulating control statements like             !
  249.  
  250. !  ! the if-statement.                                                      !
  251.  
  252. !  ! The condition of an if has to be written into this block.              !
  253.  
  254. !  ! The left of the two lower blocks will be executed if                   !
  255.  
  256. !  ! the condition is true. The lower right block will be                   !
  257.  
  258. !  ! executed if the condition is false.                                    !
  259.  
  260. !  !                                                                        !
  261.  
  262. !  ! We take all the following elements into the right lower block.         !
  263.  
  264. !  !                                                                        !
  265.    __________________________________________________________________________
  266.  
  267. !  !            !                                                           !
  268.  
  269. !  ! This block ! This block will be executed if the condition is false.    !
  270.  
  271. !  ! will be    !                                                           !
  272.  
  273. !  ! executed   ! A case is now following.                                  !
  274.  
  275. !  ! if the     !                                                           !
  276.                 _____________________________________________________________
  277.  
  278. !  ! condition  !                                                           !
  279.  
  280. !  ! is true.   ! A case is build upon a branch. You can extend a branch    !
  281.  
  282. !  !            ! to a case. Put the cursor into one of the lower blocks    !
  283.  
  284. !  !            ! of a branch and choose the command case. There will       !
  285.  
  286. !  !            ! be build some other blocks. Please look at the            !
  287.  
  288. !  !            ! examples how the case is used and the blocks are          !
  289.  
  290. !  !            ! filled with text.                                         !
  291.  
  292. !  !            !                                                           !
  293.  
  294. !  !            ! The lower right block of a case is the else-block.        !
  295.  
  296. !  !            ! We take a loop in it.                                     !
  297.  
  298. !  !            !                                                           !
  299.                 _____________________________________________________________
  300.  
  301. !  !            !  !  !  !                                                  !
  302.                 __________
  303.  
  304. !  !            !  !  !  !  A loop consists of two blocks with two common   !
  305.  
  306. !  !            !  !  !  !  edges: the lower and the right egde are common. !
  307.  
  308. !  !            !  !  !  !                                                  !
  309.  
  310. !  !            !  !  !  !  The condition for executing the lower block     !
  311.  
  312. !  !            !  !  !  !  will be placed in this block.                   !
  313.  
  314. !  !            !  !  !  !                                                  !
  315.  
  316. !  !            !  !  !  !  You can also formulate a for-statement here.    !
  317.  
  318. !  !            !  !  !  !                                                  !
  319.                             _________________________________________________
  320.  
  321. !  !            !  !  !  !  !                                               !
  322.  
  323. !  !            !  !  !  !  ! This block will be executed as long as the    !
  324.  
  325. !  !            !  !  !  !  ! condition is true or the for-statement is     !
  326.  
  327. !  !            !  !  !  !  ! active.                                       !
  328.  
  329. !  !            !  !  !  !  !                                               !
  330.    __________________________________________________________________________
  331.  
  332. !                                                                           !
  333. _____________________________________________________________________________
  334.  
  335. 01.07.1987    01.07.1987   0001000F
  336.