Jump to content

Structured program theorem

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Karlheg (talk | contribs) at 18:59, 8 February 2005 (New page, first time.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

The Structured Programming Theorem says that any imperative program need the following control statements only:

  1. Assignment statement,
  2. a sequence of statements,
  3. an If-Then and If-Then-Else statement,
  4. and a While statement.

There does not need to be a 'goto' statement. It leads to "spaghetti code", since you can jump all over the place.

(this article is a stub written by a total beginner...)