Re: Programming: Not stressful? Yeah, right...
- From: spinoza1111@xxxxxxxxx
- Date: 31 Oct 2005 01:52:54 -0800
osmium wrote:
> <spinoza1111@xxxxxxxxx> wrote:
>
> > (2) Use "virtually structured" style such that if you use go to, it
> > flows downward, not to instructions but to pseudo-instruction
> > placeholders defined only as the location of the next instruction
> > (often called EQ or EQUATE), or upward to a similar statement in a
> > structured loop.
> >
> > A "virtually structured" assembler program is one whose flowchart is
> > restricted to the Bohm-Jacopini structured constructs exclusively.
>
> What utter nonsense!
What a complete failure to understand...
>
> Structured programming eliminates go to, it does not eliminate or even
> minimize the use of branch or jump instructions. I wouldn't be at all
> surprised to find that a well structured program, when the assembly produced
> is examined, actually had *more* jumps than a "non-structured" program. To
> use a forward jump to produce a loop only makes things worse. A loop is a
> loop is a loop.
A "virtually structured" program will use a backward jump to produce a
loop, of course. However, it will jump to a pure label such as
LOOPSTART:
FYI, GO TO ***IS*** a "branch or jump" instruction.
The only assembler able to support actual as opposed to virtual
structured programming would be for hardware with no branch or jump.
Such hardware is buildable: it would contain a stack to note and record
the beginning of blocks. But to my knowledge such hardware doesn't
exist in practice, and instead, the Pentium and Motorola use "go to" in
the form of relative and absolute jumps and "branches".
You are correct that the assembled form of a program written in a
highlevel language using structured programming might have *more* go
tos in the form of "jumps and branches" than an unstructured program.
.
- References:
- Programming: Not stressful? Yeah, right...
- From: Dave
- Re: Programming: Not stressful? Yeah, right...
- From: spinoza1111
- Programming: Not stressful? Yeah, right...
- Prev by Date: Re: Programming: Not stressful? Yeah, right...
- Next by Date: Re: Synchronization routine
- Previous by thread: Re: Programming: Not stressful? Yeah, right...
- Next by thread: Re: Programming: Not stressful? Yeah, right...
- Index(es):
Relevant Pages
|