Path: csiph.com!aioe.org!.POSTED!not-for-mail From: Rod Pemberton Newsgroups: comp.lang.forth Subject: Re: Is there a free version of Forth that uses the exact same words as "Starting Forth" on Forth Inc.'s site? Date: Sat, 8 Apr 2017 03:28:07 -0400 Organization: Aioe.org NNTP Server Lines: 38 Message-ID: <20170408032807.696509ac@_> References: <7f29fd7b-e950-4dda-9456-b951f7bc5c22@googlegroups.com> <8c089adc-b6b3-44bb-ab5e-a5300c0ab9f4@googlegroups.com> NNTP-Posting-Host: ZTD62cW/Uw8bymX5ok+0NA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.forth:56853 On Fri, 7 Apr 2017 21:21:10 -0700 (PDT) hughaguilar96@gmail.com wrote: > : +loop state @ 0= if cr ." WARNING: *** no > interpretation semantics for: +LOOP ***" cr then postpone > +loop ; immediate Couldn't you define a single Forth word for much of that middle portion instead of retyping or cut-n-pasting it over and over? Ditto for the abort" check and string emit. : +loop HUGH_CHECK if ." +LOOP ***" cr then postpone +loop ; immediate Obviously, you'd need a DUP on the STATE check for the IF that follows. > : >r state @ 0= abort" *** no > interpretation semantics for: >R ***" postpone > >r ; immediate Don't the redefined words using abort" need an IF after STATE @ 0= ? If not, why are you checking STATE at all? Doesn't that leave an extraneous value on the stack? Is it intended to be an error code? Why? ... I.e., the string emit tells you it failed the STATE check. > : abort" Shouldn't you check and redefine abort" first, prior to using it in >r ? Or, perhaps, last, after everything else is redefined? ... Either way, I'd suspect that redefining abort" part of the way through the list isn't correct. Rod Pemberton -- All it takes for humanity to conquer the world's toughest problems is to hope, to believe, to share, and to do, in cooperation.