Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic General > FOR NEXT behavi...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 74 of 81 Topic 620 of 702
Post > Topic >>

FOR NEXT behavior

by "R.Nicholson" <rhnlogic@[EMAIL PROTECTED] > Sep 13, 2007 at 07:08 PM

On Sep 9, 11:24 am, "Tom Lake" <tl...@[EMAIL PROTECTED]
> wrote:
> "Judson McClendon" <ju...@[EMAIL PROTECTED]
> wrote in message
>
> news:Z8VEi.53219$t9.52839@[EMAIL PROTECTED]
>
> > <n...@[EMAIL PROTECTED]
> wrote:
> > One thing that surprised me is the behavior of FOR/NEXT, in always
making
> > one iteration, regardless of the initial loop variables. I don't
recall
> > ever using
> > a BASIC, or any other language sup****ting FOR, with that behavior.
>
> You missed some of the most popular microcomputer BASICs of the
> '70's and '80s!
>
> Altair BASIC, Applesoft BASIC, Commodore BASIC, TRS-80 Level II and
> Model III BASIC (All written by Gates and Co.) all performed one
iteration
> even when the end value was less than the start value and no step was
> specified.

I'm surprised that you didn't mention that the Basic
Standard says that a FOR NEXT loop should be skipped
if the initial value fails the end loop comparison.
I think that was the way it was originally implemented
in Dartmouth Basic.

So that's the way Chipmunk Basic attempts to behave,
skip the loop if the FOR and NEXT statements are in
the proper order.

I've once wondered whether I should put in a switch
to optionally do one iteration in order to be more
compatible with various "street" Basic programs.


IMHO. YMMV.
--
rhn A.T nicholson d.0.t C-o-M
  Chipmunk Basic: http://www.nicholson.com/rhn/basic
 




 81 Posts in Topic:
Using GOTO
ppnerkDELETETHIS@[EMAIL P  2007-09-06 14:29:31 
Re: Using GOTO
Happy Trails <nomail@[  2007-09-06 11:51:52 
Re: Using GOTO
spambait@[EMAIL PROTECTED  2007-09-06 17:12:09 
Re: Using GOTO
ppnerkDELETETHIS@[EMAIL P  2007-09-07 04:26:16 
Re: Using GOTO
Happy Trails <nomail@[  2007-09-11 11:45:38 
Re: Using GOTO
"JJ" <stacko  2007-09-11 19:59:44 
Re: Using GOTO
Happy Trails <nomail@[  2007-09-13 07:30:56 
Re: Using GOTO
"news@[EMAIL PROTECT  2007-09-06 09:08:11 
Re: Using GOTO
Happy Trails <nomail@[  2007-09-06 15:18:36 
Re: Using GOTO
Happy Trails <nomail@[  2007-09-06 15:53:00 
Re: Using GOTO
"Gordon Rahman"  2007-09-06 23:04:46 
Re: Using GOTO
"news@[EMAIL PROTECT  2007-09-06 14:29:10 
Re: Using GOTO
Happy Trails <nomail@[  2007-09-06 21:32:15 
Re: Using GOTO
Eric <englere_geo@[EMA  2007-09-06 14:33:28 
Re: Using GOTO
Bert Byfield <BertByfi  2007-09-07 01:49:49 
Re: Using GOTO
"Gordon Rahman"  2007-09-07 01:26:05 
Re: Using GOTO
"R.Nicholson" &  2007-09-06 17:02:47 
Re: Using GOTO
Happy Trails <nomail@[  2007-09-06 21:37:58 
Re: Using GOTO
Bert Byfield <BertByfi  2007-09-07 01:52:00 
Re: Using GOTO
"Judson McClendon&qu  2007-09-07 06:21:26 
Re: Using GOTO
"R.Nicholson" &  2007-09-06 17:22:42 
Re: Using GOTO
"news@[EMAIL PROTECT  2007-09-07 01:47:13 
Re: Using GOTO
"news@[EMAIL PROTECT  2007-09-07 01:50:34 
Re: Using GOTO
"Gordon Rahman"  2007-09-07 12:52:11 
Re: Using GOTO
"news@[EMAIL PROTECT  2007-09-07 07:27:26 
BBC and DEFINT etc [Was: Using GOTO]
ppnerkDELETETHIS@[EMAIL P  2007-09-08 13:58:42 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-08 09:20:47 
Re: BBC and DEFINT etc [Was: Using GOTO]
Happy Trails <nomail@[  2007-09-08 12:35:58 
Re: BBC and DEFINT etc [Was: Using GOTO]
ppnerkDELETETHIS@[EMAIL P  2007-09-15 11:29:36 
Re: BBC and DEFINT etc [Was: Using GOTO]
budgie <me@[EMAIL PROT  2007-09-16 13:41:32 
Re: BBC and DEFINT etc [Was: Using GOTO]
ppnerkDELETETHIS@[EMAIL P  2007-09-16 09:56:21 
Re: BBC and DEFINT etc [Was: Using GOTO]
Happy Trails <nomail@[  2007-09-08 12:35:58 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-08 09:20:47 
BBC and DEFINT etc [Was: Using GOTO]
ppnerkDELETETHIS@[EMAIL P  2007-09-08 13:58:42 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-08 09:14:03 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-10 07:59:48 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-10 07:59:48 
Re: BBC and DEFINT etc [Was: Using GOTO]
Derek <derekrss@[EMAIL  2007-09-08 23:44:55 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-09 02:57:07 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-09 07:14:46 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-09 07:14:46 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-09 08:43:28 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-09 11:28:45 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-09 14:24:47 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-09 14:21:39 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-09 16:44:45 
Re: BBC and DEFINT etc [Was: Using GOTO]
Happy Trails <nomail@[  2007-09-09 17:31:18 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-10 09:46:37 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-10 09:46:37 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-09 16:44:45 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-09 14:21:39 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-09 14:24:47 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-09 11:28:45 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-09 15:28:28 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-09 20:10:59 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-10 10:44:36 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Judson McClendon&qu  2007-09-10 10:44:36 
FOR NEXT behavior
"news@[EMAIL PROTECT  2007-09-10 01:40:46 
Re: FOR NEXT behavior
"JJ" <stacko  2007-09-10 14:04:09 
Re: FOR NEXT behavior
Fred McKenzie <fmmck@[  2007-09-10 14:51:40 
Re: FOR NEXT behavior
"JJ" <stacko  2007-09-10 14:04:09 
Re: FOR NEXT behavior
Fred McKenzie <fmmck@[  2007-09-10 14:51:40 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-10 05:14:37 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-10 14:17:55 
Re: BBC and DEFINT etc [Was: Using GOTO]
"JJ" <stacko  2007-09-10 20:08:48 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-10 15:44:28 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-10 15:53:08 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-10 15:53:08 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-10 15:44:28 
Re: BBC and DEFINT etc [Was: Using GOTO]
"Tom Lake" <  2007-09-10 14:17:55 
Re: FOR NEXT behavior
"news@[EMAIL PROTECT  2007-09-10 06:32:31 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-10 09:48:04 
Re: Using GOTO
"R.Nicholson" &  2007-09-12 00:36:03 
FOR NEXT behavior
"R.Nicholson" &  2007-09-13 19:08:27 
Re: FOR NEXT behavior
"Tom Lake" <  2007-09-14 00:06:07 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-08 09:14:03 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-09 02:57:07 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-09 08:43:28 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-09 15:28:28 
Re: FOR NEXT behavior
"news@[EMAIL PROTECT  2007-09-10 06:32:31 
Re: BBC and DEFINT etc [Was: Using GOTO]
"news@[EMAIL PROTECT  2007-09-10 09:48:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Nov 20 21:24:11 CST 2008.