Send Close Add comments: (status displays here)
Got it!  This site "robinsnyder.com" uses cookies. You consent to this by clicking on "Got it!" or by continuing to use this website.  Note: This appears on each machine/browser from which this site is accessed.
Single entry single exit blocks
by RS  admin@robinsnyder.com : 1024 x 640


1. Single entry single exit blocks
Single-entry single-exit blocksSESE (Single Entry Single Exit) code blocks are important for program correctness and understanding and reasoning about the behavior of program code.

Almost any group of contiguous statements can be (mentally) considered a block.

KISS = Keep It Simple Stupid.

2. Violating block structure
One waySESE blocks with one way in and one way out have many advantages in reasoning about programs.
Some (useful) commands violate SESE blocks structure. These should be localized so that on outer block can be conceptualized. There should be only one way in and one way out of a block.

3. Structured programming
Book: Systematic programming: an introduction Single-entry single-exit blocksIn his book Structured programming (1975), Nicklaus Wirth, inverter of the Pascal programming language, popularized the idea of "structured programming" where programs consisted of a hierarchy of single-entry single exit blocks without using the goto statement.

Information sign More: Niklaus Wirth

4. Goto controversy
Book: Structured programming As part of the "structured programming" movement in programming, Dijkstra started the controversy/war in 1968 that raged for more than 20 years and has not ended to this day. His letter to the editor was entitled
"Go to statement considered harmful".

Information sign More: Edsger Dijkstra

by RS  admin@robinsnyder.com : 1024 x 640