[Coco] C VS Basic Coco

Wayne Campbell asa.rand at gmail.com
Thu Feb 15 15:21:10 EST 2018


Basic09 has the GOTO statement, but you are not stuck with it. I have
written many programs that do not use a single GOTO, not even a IF/THEN
<line reference>. Most programs will, though, use GOSUB statements for
subroutines, and those require line numbers the same as GOTOs do. Line
numbers are not required on every line, only on lines pointed to by
GOSUB/GOTO statements (or RESTORE<line reference> statements).

On Feb 15, 2018 11:04 AM, "phil pt" <ptaylor2446 at gmail.com> wrote:

> Let me please point out that you stuck on the goto commands when your using
> basic compilers like Realbasic you can write code without using goto
> commands.
>
> On Thu, Feb 15, 2018 at 7:57 AM, Francis Swygert <farna at att.net> wrote:
>
> > 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
> >
> > --
> > Coco mailing list
> > Coco at maltedmedia.com
> > https://pairlist5.pair.net/mailman/listinfo/coco
> >
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list