[Coco] C VS Basic Coco

Francis Swygert farna at att.net
Thu Feb 15 07:57:29 EST 2018


Date: Wed, 14 Feb 2018 17:06:38 +0000
From: Bill Gunshannon <bill.gunshannon at hotmail.com>

Ask Dykstra.  Or just look at the decades of research into why GOTOs are bad.
In one of my last professional programming gigs I took more than a dozen
programs heavily laced with GOTOs (true spaghetti code!!) and using proper
structured programming removed all of them.  While I am not one who heavily
favors standards bodies I think when they decided to come up with a BASIC
standard it should have deprecated the GOTO entirely.

bill
==============================================
While I can understand that there is such a thing as to many GOTOs, it's very useful in some cases. You can misuse anything! A GOTO statement is the simplest way to call up a subroutine, such as in a program menu. Really simple code -- I haven't coded in so long I can't remember the real code for a keypress... but "IF X THEN GOTO 500" is pretty darned simple and handy for calling a subroutine from a menu. Hmm... would be a line for key polling, then a list of GOTO lines for the selections.... or a range in one line... I forget!! 
 Frank Swygert
 Fix-It-Frank Handyman Service
 803-604-6548


More information about the Coco mailing list