Re: Structured Coding
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Thu, 9 Feb 2006 16:07:33 -0700
<Frank.Swarbrick@xxxxxxxxxxxxxx> writes:Michael Wojcik<mwojcik@xxxxxxxxxxx> 02/06/06 11:01 AM >>>
In article <44foukF1vhs6U2@xxxxxxxxxxxxxx>, "Frank Swarbrick"
1982Hmm, 1991 was definitely *not* "before the time of sturctured code". I
learned about structured coding when was was in junior high school in
notor so. This was using Pascal. I'm not even sure if Pascal has a goto
statement! (No, just kidding, I'm sure it does. We were just told to
use it.)
Standard Pascal does include goto, but it's deprecated, and labels
can only be integers of up to four digits (which is odd, considering
Wirth's goal of expressive and readable code). Many Pascal
implementations allow symbolic labels, but they still typically
discourage use of goto in Pascal programs.
Typically, goto is used in Pascal to escape from nested loops in the
event of an error.
Java has no goto statement proper, though it provides restricted
gotos that can only branch to certain locations (break and continue).
I like this quote from _Learning Java_:
"Multilevel break and continue statements remove the remaining justification
for the evil 'goto' statement in C/C++".
I've personally never used it, but then I haven't done a huge amount of Java
anyway. (Other than rewriting the same program over and over each time I
find a new feature. "-) )
Bought a book on C# the other day. Has a surprising amount of good stuff.
Can't recall offhand if it has multilevel break/continue statements, or
something similar.
---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
.
- Follow-Ups:
- Re: Structured Coding
- From: Michael Wojcik
- Re: Structured Coding
- References:
- Structured Coding
- From: apple.time@xxxxxxxxx
- Re: Structured Coding
- From: Frank Swarbrick
- Re: Structured Coding
- From: Michael Wojcik
- Structured Coding
- Prev by Date: Re: GoTo in Java
- Next by Date: Re: xml schema (xsd) in cobol
- Previous by thread: Re: Structured Coding
- Next by thread: Re: Structured Coding
- Index(es):
Relevant Pages
|