Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #10295

Signed and unsigned looping.

Newsgroups comp.lang.forth
From Albert van der Horst <albert@spenarnc.xs4all.nl>
Subject Signed and unsigned looping.
Date 2012-03-22 11:52 +0000
Message-ID <m1abnz.65f@spenarnc.xs4all.nl> (permalink)
Organization Dutch Forth Workshop

Show all headers | View raw


I have been thinking about how to simplify the looping in Forth.
One of the main reasons for complexity is the fact that looping
is at the same time for numbers (signed) and addresses (unsigned).
But do we really a guarantee that passing from
$7FFF,FFFF,FFFF,FFFx to $8000,0000,0000,000x succeeds?
Unstead of the requirement that unsigned numbers could be
handled, we could require that a range containing
$8000 or $7FFF must be handled. This would be no restriction at
all unless we are on a 16-bit system.

The next biggest problem is that +LOOP may be going up or going down,
and you don't know. Of course nobody in his right mind would ever use
+LOOP on something other than a constant, but that doesn't help
implementers. Occasionally going down a range by cells is useful.

Groetjes Albert

--
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

Back to comp.lang.forth | Previous | NextNext in thread | Find similar


Thread

Signed and unsigned looping. Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-22 11:52 +0000
  Re: Signed and unsigned looping. BruceMcF <agila61@netscape.net> - 2012-03-22 08:14 -0700
  Re: Signed and unsigned looping. anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-03-22 17:33 +0000
  Re: Signed and unsigned looping. Krishna Myneni <krishna.myneni@ccreweb.org> - 2012-03-26 06:31 -0700

csiph-web