Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About using GOTO . . .
#61
Quote:*is* indented. (I didn't learn to read diagaonally.) The first thing I do when I get indented code is run it through my handy dandy code unindenter.

"Folks who don't indent: How do you read your own code? "

It depends on your coding style. It helps out with nested IF/END IFs which I make extensive use of. Your missing END IF you talked about in a prev post would have been easily found if your code was indented. But, again, it is all with your *own* coding style.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#62
I put in indents just to see if they'd help find the missing END IF. They didn't. (I hate white space. I don't like reading diagonally. And most of all, I don't like having to use short lines on the inner levels.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#63
To each his own... I see where you are coming from Glenn... as long as I don't get any stupid error messages if I run your code then that's fine.

Perhaps there should be a new forum where Glenn posts his mangled code and we try to work out what it does and how it does it :wink:
Reply
#64
If it matters how you wrote your source code, you screwed up, because I didn't obtain your program so I can read it (I'd rather sit in a corner and eat a can of worms). I obtained it so I can *run* it--and when it doesn't work, it's *your* problem, not mine. If I decide I want to make it my problem, then it is in fact *my* problem.
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#65
Quote:Heey, a supporter! Big Grin

Lets all gang up on Glenn! Big Grin

Before you try that... I might as well add that I use GOTO. There are some programming algos that goto is the best solution.

Ie.

For
For
If found then Goto here:
next
next

Here:

Now try that with the exit sub or variables....

Things are better used if you use it wisely.
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#66
Code:
FOR
FOR
IF found = TRUE THEN EXIT FOR
NEXT
IF found = TRUE THEN EXIT FOR
NEXT

This works, but GOTO is quicker. It's just using GOTO as spaghetti code that is tricky.

And by the way, what is your guy's opinion on indenting?

Let me guess...

Glenn: I HATE indenting.

Na_th_an: I think it looks better.

Hexadecimal Disaster: *Sigh* ( :rotfl: )
Reply
#67
Ok.. I'm sorry guys, but since this post is dead and you guys are still beating it... what is this "42"?
Reply
#68
Hey, all I pretended to say in my post is "CODE AS YOU LIKE!!". Then ENDIF thing was not a "hey, if you had indented, you wouldn't have had that problem", but it was a "hey, I use indentation to solve such problems". And now, this should be over. I use GOTOs when needed, and I indent, and that's fine for me. If you don't like GOTOs or indentation, I don't care, as I am quite sure you don't care that I do.

Paraphrasing my friend Adigun, _PERIOD, END OF CONVERSATION_ Wink
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply
#69
"Your missing END IF you talked about in a prev post would have been easily found if your code was indented." (The problem wouldn't have occurred in the first place if I hadn't used the IF THEN/END IF constructs in the first place--and that's the logic of the anti-GOTO people.) So, PTHHHHHHH! (Which is the content of http://www.geocities.com/gstumpff/hhg.gif spelled out.)
ravelling Curmudgeon
(geocities sites require copying and pasting URLs.)
I liked spam better when it was something that came in a can.
Windows should be defenestrated.
Reply
#70
Quote:It depends on your coding style. It helps out with nested IF/END IFs which I make extensive use of.

I also wrote that. If you don't know to handle the whole concept of a post and you need to stop in each phrase, that's your problem.
SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)