 | | Re: Are there GOTO statements in NQC?
|
|
(...) Well, you'll hear people telling you: 1) Use the GOTO - it's fine. 2) Use it sparingly - it's dubious. 3) Use it only if you are totally stuck. 4) Never, ever use it - it is the work of Satan. I fall into group (4). I've been working as a (...) (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | Re: Are there GOTO statements in NQC?
|
|
(...) In NQC, it is necessary to be especially careful about the use of goto as Dave writes in the NQC Guide: The goto statement should be used sparingly and cautiously. In almost every case, control structures such as if, while, and switch make a (...) (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | Re: Are there GOTO statements in NQC?
|
|
(...) Ralph, I think it is a stupid rule! (...) Kevin (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | RE: Are there GOTO statements in NQC?
|
|
(...) <snipped rant> (...) And as a longtime embedded guy myself, I agree with Mark. It's the old sharp tools and dull craftsman thing. In the hands of a practiced expert, the goto can be a thing of beauty and can make the code more readable, which (...) (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | Re: Are there GOTO statements in NQC?
|
|
(...) I'd love to take up the personal challenge of eliminating your need for goto. Can you share your code with me? Email would be fine. Kevin (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | Re: Are there GOTO statements in NQC?
|
|
(...) As a general rule I do not use goto's because I don't have a need for them. I've coded so many LOC in my life that the "if then else" structure of modern language was a step up from where I started. :^) The original BASIC and FORTAN had gotos (...) (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | Re: Are there GOTO statements in NQC?
|
|
(...) I'm probably in the minority here, but I'm going to come right out and say that goto's are not a bad thing, contrary to popular belief. In fact, I find it rather pompous when I come across admonishments in textbooks that there is no valid (...) (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | Re: Are there GOTO statements in NQC?
|
|
(...) NQC has supported the goto statement since version 2.5a3 (which was released a long time ago). (...) Nope. It's already there. John Hansen (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | Re: Are there GOTO statements in NQC?
|
|
(...) Y'know, I really ought to check the latest version before saying these sorts of things. It appears that goto has actually been implemented since the last time I fiddled with NQC. Sorry for the misinformation. - Alex (23 years ago, 20-Nov-03, to lugnet.robotics)
|
| |
 | | Re: Are there GOTO statements in NQC?
|
|
(...) No, NQC does not support goto. I at one point started to add goto to the language, but abandoned the effort when I installed legOS on my brick. It's not really all that hard to add goto to the NQC language; it's a couple minor changes to the (...) (23 years ago, 20-Nov-03, to lugnet.robotics)
|