[Coco] GOTO and code maintainability

Bill Barnes da3m0n_slay3r at yahoo.com
Fri Sep 11 02:29:10 EDT 2009


Another variation of an infinite loop, no GOTO used:

10 FOR I=0TO1STEP0:PRINT"HELLO MOTO":NEXT I


This one Wont work though, seems that -10 > 1 in the test (at least in VCC):

10 FOR I=0TO1STEP-10:PRINT"HELLO MOTO":NEXT I


-Later!   -WB-    -- BABIC Computer Consulting.


--- On Thu, 9/10/09, Jorge Renato Machin Ibarra <jorge_machin at hotmail.com> wrote:

> From: Jorge Renato Machin Ibarra <jorge_machin at hotmail.com>
> Subject: Re: [Coco] GOTO and code maintainability
> To: coco at maltedmedia.com
> Date: Thursday, September 10, 2009, 11:27 AM
> 
> Darren:
> 
> 10 PRINT "HELLO WORD":RUN
> 
> Technically, there is no goto :P
> 
> Jorge Machin
> 
> > Date: Thu, 10 Sep 2009 09:43:26 -0600
> > From: mechacoco at gmail.com
> > To: coco at maltedmedia.com
> > Subject: Re: [Coco] GOTO and code maintainability
> > 
> > On 9/10/09, Rogelio Perea wrote:
> > >
> > > 10 FOR I=0 TO 1:PRINT"HELLO WORLD ";:I=0:NEXT
> > >
> > > "Where's the GOTO 10?" was the initial question
> :-)
> > >
> > ---
> > 
> > You could also use a step value of 0 as in:
> > 
> > 10 FOR I=0 TO 1 STEP 0:PRINT"HELLO WORLD ";:NEXT
> > 
> > 
> > Darren



      



More information about the Coco mailing list