To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.funOpen lugnet.off-topic.fun in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Fun / 5572
5571  |  5573
Subject: 
Re: Encoding? (was Re: This isn't good enough!
Newsgroups: 
lugnet.off-topic.fun
Date: 
Thu, 13 Jul 2000 15:18:06 GMT
Viewed: 
608 times
  
In lugnet.off-topic.fun, DaveG wrote:

10 REM Why GOTO is a bad idea
11 REM you find code like this...
30 FOR N = 1 TO 3
40 GOTO 100*N
50 NEXT N
55 END
60 REM Oh, so smart he cut himself
100 ? "One"
110 GOTO 50
200 ? "TWO"
210 GOTO 50
300 ? "Three"
310 GOTO 50
999 REM Best DaveG

Yikes!  That's not the JMP that's bad, it's the target calculation!  That's
what ON <expr> GOTO <label>, <label>, ... was created for!

Steve



Message has 1 Reply:
  Re: Encoding? (was Re: This isn't good enough!
 
(...) [snip] (...) It's not what it was created for It's WHY it was created. Yes to make a bad practice part of the language, ROTFHMGUATI*. But more to the point adding ON to the debate is hardly going to advance GOTO's position as most hated (...) (24 years ago, 13-Jul-00, to lugnet.off-topic.fun)

Message is in Reply To:
  Re: Encoding? (was Re: This isn't good enough!
 
(...) 10 REM Why GOTO is a bad idea 11 REM you find code like this... 30 FOR N = 1 TO 3 40 GOTO 100*N 50 NEXT N 55 END 60 REM Oh, so smart he cut himself 100 ? "One" 110 GOTO 50 200 ? "TWO" 210 GOTO 50 300 ? "Three" 310 GOTO 50 999 REM Best DaveG (24 years ago, 12-Jul-00, to lugnet.off-topic.fun)

48 Messages in This Thread:

















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR