Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: comp.lang.forth Subject: Re: Forth16e, Forth32e, "de facto" forth programming standards for embedded Date: Tue, 22 Jul 2014 04:25:29 -0400 Organization: Aioe.org NNTP Server Lines: 25 Message-ID: References: <49aa991d-41c6-44ae-afe4-ad1b7434011b@googlegroups.com> <9f8a7188-7ef0-4ae4-8341-e27a41f9a44b@googlegroups.com> <836283a2-64a1-4811-b653-13a099fbbb46@googlegroups.com> <0ade3c7c-d1c0-41f5-8f5e-055d66aaff6b@googlegroups.com> <53c928c6.819888433@news.demon.co.uk> <7xmwc69rdv.fsf@ruckus.brouhaha.com> <7xegxi9pzi.fsf@ruckus.brouhaha.com> <7edd6024-75fc-4c09-a7a9-892cd8b2c176@googlegroups.com> <0cedfdec-1922-4cc3-a339-2c5b292eb485@googlegroups.com> <26e2e926-3fd3-46a9-8876-42f1570795b6@googlegroups.com> <75a32142-6f65-4518-aa9d-3068bedd8899@googlegroups.com> <9f1f90ed-adf3-4fa8-8702-4f5984fc69b5@googlegroups.com> NNTP-Posting-Host: CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:32540 On Tue, 22 Jul 2014 04:06:23 -0400, Raimond Dragomir wrote: > Rod Pemberton wrote >> Most high-level languages have counter based loops. >> >> What do you suggest instead? I.e., it still needs a >> counter, and needs to work with ANS, Forth 83, >> fig-Forth, etc. >> > C doen't have a real counting loop. FOR is just sintactic sugar for a > while() loop. You can do almost whatever you like with FORs, for example > doing for(;;) loops instead of while(1) loops, or using any kind of > expression inside... While true, that misses the point. By removing DO LOOP ?DO +LOOP , Hugh removes the syntactic "sugar" from Forth just like removing for() from C. You'd need to use BEGIN AGAIN UNTIL in Forth or while() or do-while() in C with counters. This can be done but it's more work. I'd expect that most coding in Forth would want looping words that work with counters. Rod Pemberton