Subject:
|
Re: Are there GOTO statements in NQC?
|
Newsgroups:
|
lugnet.robotics
|
Date:
|
Thu, 20 Nov 2003 23:45:43 GMT
|
Original-From:
|
Steve Baker <sjbaker1@airmail!IHateSpam!.net>
|
Viewed:
|
965 times
|
| |
| |
Rob Limbaugh wrote:
> I find that GOTO is a very handy way to bypass code to test some
> alternate code in high-level languages.
Nope - that's why we have #ifdef/#endif
> It is also a command that is
> easy to match to a machine language code of various processor types.
Not on a modern CPU where changing the flow of control disrupts instruction
caching.
> In writing batch scripts on Windows platforms, GOTO becomes essential
> because of the way certain commands are processed.
Well - I wouldn't count batch scripting as programming...But if you use a decent
batch scripting language like 'bash' under Linux (also works under Windows)
then it has all of the standard C flow control constructs and 'goto' is not
needed.
> Of course, the last major programming I ever did was almost 20 years ago
> when line numbers still had to be entered for programs in BASIC and the
> equivalent for "GOTO" in ML was "JMP". Back then, it some programs
> would execute faster if simple commands were used.
Yep - BASIC programming was probably the last time I used a GOTO.
Fortunately, even BASIC programmers now have VisualBasic which can
be programmed quite effectively without GOTO's.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net> WorkEmail: <sjbaker@link.com>
HomePage : http://www.sjbaker.org
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net
-----BEGIN GEEK CODE BLOCK-----
GCS d-- s:+ a+ C++++$ UL+++$ P--- L++++$ E--- W+++ N o+ K? w--- !O M-
V-- PS++ PE- Y-- PGP-- t+ 5 X R+++ tv b++ DI++ D G+ e++ h--(-) r+++ y++++
-----END GEEK CODE BLOCK-----
|
|
Message is in Reply To:
| | RE: Are there GOTO statements in NQC?
|
| I find that GOTO is a very handy way to bypass code to test some alternate code in high-level languages. It is also a command that is easy to match to a machine language code of various processor types. In writing batch scripts on Windows (...) (21 years ago, 20-Nov-03, to lugnet.robotics)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
Active threads in Robotics
|
|
|
|