Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #134749
| Date | 2026-03-20 12:18 +1100 |
|---|---|
| Subject | Re: Borrow loop from other languages |
| Newsgroups | comp.lang.forth |
| References | (1 earlier) <10pg7kg$gr82$1@dont-email.me> <69bbcf87$1@news.ausics.net> <10pgsie$nrtk$1@dont-email.me> <69bc21ec$1@news.ausics.net> <nnd$54c07bfc$1dc4a4c9@912bc05a634a75e5> |
| From | dxf <dxforth@gmail.com> |
| Message-ID | <69bca07d$1@news.ausics.net> (permalink) |
| Organization | Ausics - https://newsgroups.ausics.net |
On 20/03/2026 4:31 am, Hans Bezemer wrote: > On 19-03-2026 17:18, dxf wrote: >> On 20/03/2026 12:09 am, Lev wrote: >>> ... >>> The LEAVE issue is one I hadn't considered. In pre-83 systems, >>> was the problem that LEAVE had to search for the loop end, or >>> was it about nested loop interaction? The ANS standard's >>> UNLOOP feels like it's still working around some of the same >>> tensions. >> >> 79-LEAVE simply set the index to the limit. The programmer had >> to ensure a path to LOOP for exit to occur. In contrast 83-LEAVE >> knows where to jump and can exit immediately. >> >> UNLOOP fixed an omission - the ability to EXIT the definition, >> not merely the loop. Pre-83 one could drop two items from the >> return stack and be reasonably sure it would work. By 83 odds >> were that it wouldn't. >> > > Well - there is a price to be paid for all that fancy stuff. 4tH largely copies Forth-79. "LEAVE" is equivalent to "RDROP R@ >R". "UNLOOP" is equivalent to "RDROP RDROP". > > The point is - "LEAVE" isn't like "WHILE". "LEAVE" is *always* buried in one or more "IF" constructs. > ... Which only required a THEN to resolve. Some forths had ?LEAVE which doesn't seem to be popular anymore. Presumably a macro would work where folks want a single word. AFAIR 79-LEAVE was problem because it invariably needed to followed by an ELSE causing the code to become more complicated than it ought.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar
Borrow loop from other languages albert@spenarnc.xs4all.nl - 2026-03-15 12:20 +0100
Re: Borrow loop from other languages Hans Bezemer <the.beez.speaks@gmail.com> - 2026-03-15 19:06 +0100
Re: Borrow loop from other languages albert@spenarnc.xs4all.nl - 2026-03-15 19:12 +0100
Re: Borrow loop from other languages antispam@fricas.org (Waldek Hebisch) - 2026-03-15 20:24 +0000
Re: Borrow loop from other languages albert@spenarnc.xs4all.nl - 2026-03-16 12:14 +0100
Re: Borrow loop from other languages minforth <minforth@gmx.net> - 2026-03-16 16:24 +0100
Re: Borrow loop from other languages Hans Bezemer <the.beez.speaks@gmail.com> - 2026-03-18 16:11 +0100
Re: Borrow loop from other languages thresh3@fastmail.com (Lev) - 2026-03-18 19:10 +0000
Re: Borrow loop from other languages thresh3@fastmail.com (Lev) - 2026-03-18 19:10 +0000
Re: Borrow loop from other languages thresh3@fastmail.com (Lev) - 2026-03-19 01:12 +0000
Re: Borrow loop from other languages dxf <dxforth@gmail.com> - 2026-03-19 13:02 +1100
Re: Borrow loop from other languages thresh3@fastmail.com (Lev) - 2026-03-19 07:12 +0000
Re: Borrow loop from other languages dxf <dxforth@gmail.com> - 2026-03-19 21:27 +1100
Re: Borrow loop from other languages thresh3@fastmail.com (Lev) - 2026-03-19 13:09 +0000
Re: Borrow loop from other languages dxf <dxforth@gmail.com> - 2026-03-20 03:18 +1100
Re: Borrow loop from other languages Hans Bezemer <the.beez.speaks@gmail.com> - 2026-03-19 18:31 +0100
Re: Borrow loop from other languages thresh3@fastmail.com (Lev) - 2026-03-19 17:53 +0000
Re: Borrow loop from other languages dxf <dxforth@gmail.com> - 2026-03-20 12:18 +1100
Re: Borrow loop from other languages thresh3@fastmail.com (Lev) - 2026-03-19 13:35 -0500
Re: Borrow loop from other languages thresh3@fastmail.com (Lev) - 2026-03-19 20:18 -0500
Re: Borrow loop from other languages dxf <dxforth@gmail.com> - 2026-03-20 18:54 +1100
csiph-web