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 > Forth > Re: starting fo...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 9 Topic 3801 of 4288
Post > Topic >>

Re: starting forth ch4 problem 5

by anton@[EMAIL PROTECTED] (Anton Ertl) Mar 6, 2008 at 10:27 AM

Elizabeth D Rather <erather@[EMAIL PROTECTED]
> writes:
>Ian's advice to use ?DO when the index might be zero is the correct 
>approach.

In Gforth you can also use +DO instead; you will notice a difference
when you try

-1 stars

The ?DO version produces a huge number of stars, because it counts up
until the index reaches -1 (through wraparound).  In contrast, the +DO
version prints no stars.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: http://www.forth200x.org/forth200x.html
   EuroForth 2008:
http://www.complang.tuwien.ac.at/anton/euroforth/ef08.html
 




 9 Posts in Topic:
starting forth ch4 problem 5
gavino <gavcomedy@[EMA  2008-03-05 14:46:33 
Re: starting forth ch4 problem 5
Ian Osgood <iano@[EMAI  2008-03-05 15:25:25 
Re: starting forth ch4 problem 5
Elizabeth D Rather <er  2008-03-05 14:00:42 
Re: starting forth ch4 problem 5
anton@[EMAIL PROTECTED]   2008-03-06 10:27:54 
Re: starting forth ch4 problem 5
Bruce McFarling <agila  2008-03-06 08:33:23 
Re: starting forth ch4 problem 5
John Doty <jpd@[EMAIL   2008-03-06 20:08:44 
Re: starting forth ch4 problem 5
gavino <gavcomedy@[EMA  2008-03-06 09:13:51 
Re: starting forth ch4 problem 5
Elizabeth D Rather <er  2008-03-06 08:05:59 
Re: starting forth ch4 problem 5
Mikael Nordman <oh2aun  2008-03-06 18:49:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Mon Oct 13 8:20:10 CDT 2008.