Placement of variable declarations in C
Posted Oct 28, 2007 2:16 UTC (Sun) by
giraffedata (subscriber, #1954)
In reply to:
Placement of variable declarations in C by RobSeace
Parent article:
A potential competitor for GCC: pcc
Structured programming isn't algorithmic programming that avoids excessive gotos. It's a different form of programming, and it doesn't have a goto concept at all.
Ideally, one would use a structured programming language for structured programming, but when forced to use C, one can use a paradigm that makes a structured meta-language out of it. For example, never use a goto statement.
You can look at a C program written in the structured paradigm as algorithmic and see looping and branching (obviously a compiler does), but since it wasn't written to be read that way, it won't be as easy to understand.
Structured programming has a for structure. It was named before C existed, and C's 'for' statement is meant to allude to it, though it is not the same as a structured for statement, e.g. in Pascal. The fact that the value of the index variable is predictable outside of the for statement is one way to tell the difference.
Besides algorithmic (branching and looping) and structured programming, there are various other forms of programming that don't have branches. LISP, Forth, and SAS are examples.
(
Log in to post comments)