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: BETWEEN
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 17 of 151 Topic 3827 of 4325
Post > Topic >>

Re: BETWEEN

by Bruce McFarling <agila61@[EMAIL PROTECTED] > Mar 12, 2008 at 12:43 PM

On Mar 12, 3:21 pm, Coos Haak <chfo...@[EMAIL PROTECTED]
> wrote:
> Op Wed, 12 Mar 2008 11:56:09 -0700 (PDT) schreef Bruce McFarling:
>
>
>
> > On Mar 12, 2:29 pm, Coos Haak <chfo...@[EMAIL PROTECTED]
> wrote:
> >>> I believe that whether
>
> >>> HEX 0 8000 FFFF 1+ WITHIN . DECIMAL
> >>> and
> >>> HEX 0 8000 FFFF BETWEEN . DECIMAL
>
> >>> ... gives the same result may depend on the size of the cell. For a
16
> >>> bit system, perhaps not.
>
> >>> This is the same modulus problem that makes for both ``?DO'' and
> >>> ``DO''.
>
> >> Did you check? I did, and both gave zero with 16 bit and with 32 bit
> >> implementations as well. What were your expectations?
>
> > Yes, but that computer is not this computer, and I transcribed the
> > arguments in the wrong order. Its
>
> > 8000 0 FFFF BETWEEN .
>
> > which will fail for the boundary condition for a 16-bit system.
>
> > To reproduce the boundary system for any 2's complement system, the
> > address of >IN ought to be somewhere between 0 and max-U, i.e.,
> > TRUE ... does 1+ WITHIN work?
>
> >>IN 0 TRUE 1+ WITHIN .
>
> 0 equals TRUE 1+
> I would call this misuse of WITHIN.

But its an appropriate use of BETWEEN ... kind of, that's the point of
Ed's first post?

Say, you are running on an 8086, with the forth in the codespace, and
one of the other memory space frames being used for something that
fills one type of data from the bottom and another type from the top,
and you want to check whether the size of the total data you want to
shove in there lies between the first free address and last free
address ...

.... surely ``( size 0 TRUE -- ) BETWEEN'' ought to yield TRUE?

That's *why* ``: BETWEEN ( x1 x2 x3 - fl ) 1+ WITHIN ;'' is only a
"mostly correct" definition ... there is a valid range for BETWEEN
that cannot be expressed for WITHIN (actually there are Max-U of them,
but only two that are clear at a glance what they are trying to do).

You get the same problem if you try

-5 MOST-NEGATIVE MOST-POSITIVE BETWEEN

with the two-word definition of BETWEEN. 1+ MOST-POSITIVE and in a 2's
complement machine, it wraps around to most-negative and nothing is
ever within that range.
 




 151 Posts in Topic:
BETWEEN
"Ed" <nospam  2008-03-11 10:05:05 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-10 23:27:36 
Re: BETWEEN
"Ed" <nospam  2008-03-12 10:59:55 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-12 02:02:50 
Re: BETWEEN
"Ed" <nospam  2008-03-14 12:44:03 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-14 19:55:40 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-11 23:38:22 
Re: BETWEEN
Elizabeth D Rather <er  2008-03-11 21:57:31 
Re: BETWEEN
"Ed" <nospam  2008-03-14 12:50:14 
Re: BETWEEN
Bruce McFarling <agila  2008-03-21 06:59:32 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-21 15:16:33 
Re: BETWEEN
Bruce McFarling <agila  2008-03-11 20:06:28 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-12 19:29:05 
Re: BETWEEN
William James <w_a_x_m  2008-03-12 02:28:18 
Re: BETWEEN
Bruce McFarling <agila  2008-03-12 11:56:09 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-12 20:21:19 
Re: BETWEEN
Bruce McFarling <agila  2008-03-12 12:43:41 
Re: BETWEEN
Bruce McFarling <agila  2008-03-13 18:59:54 
Re: BETWEEN
Bruce McFarling <agila  2008-03-13 19:07:20 
Re: BETWEEN
"Ed" <nospam  2008-03-14 14:50:16 
Re: BETWEEN
Bruce McFarling <agila  2008-03-14 06:45:40 
Re: BETWEEN
Bruce McFarling <agila  2008-03-14 07:32:38 
Re: BETWEEN
Bruce McFarling <agila  2008-03-14 07:38:48 
Re: BETWEEN
Bruce McFarling <agila  2008-03-14 13:57:04 
Re: BETWEEN
Bruce McFarling <agila  2008-03-16 13:27:20 
Re: BETWEEN
Bruce McFarling <agila  2008-03-18 08:51:45 
Re: BETWEEN
anton@[EMAIL PROTECTED]   2008-03-18 19:49:37 
Re: BETWEEN
Bruce McFarling <agila  2008-03-20 14:16:42 
Re: BETWEEN
Bruce McFarling <agila  2008-03-20 14:20:37 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-21 11:44:48 
Re: BETWEEN
Bruce McFarling <agila  2008-03-20 15:31:50 
Re: BETWEEN
William James <w_a_x_m  2008-03-12 02:41:44 
Re: BETWEEN
Bruce McFarling <agila  2008-03-12 08:47:12 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-12 12:14:00 
Re: BETWEEN
Bruce McFarling <agila  2008-03-12 11:14:39 
Re: BETWEEN
mhx@[EMAIL PROTECTED] (M  2008-03-12 19:29:03 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-12 14:57:02 
Re: BETWEEN
Brad Eckert <nospaambr  2008-03-14 08:23:24 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-14 09:33:12 
Re: BETWEEN
William James <w_a_x_m  2008-03-15 12:56:09 
Re: BETWEEN
"Ed" <nospam  2008-03-16 17:44:01 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-16 08:57:06 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-17 11:02:53 
Re: BETWEEN
Elizabeth D Rather <er  2008-03-17 10:31:11 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-16 08:08:44 
Re: BETWEEN
"Ed" <nospam  2008-03-20 11:38:02 
Re: BETWEEN
Bruce McFarling <agila  2008-03-15 13:43:21 
Re: BETWEEN
Bruce McFarling <agila  2008-03-15 17:09:04 
Re: BETWEEN
Aleksej Saushev <asau@  2008-03-16 04:15:04 
Re: BETWEEN
Bruce McFarling <agila  2008-03-15 21:11:00 
Re: BETWEEN
Josh Grams <josh@[EMAI  2008-03-16 13:09:01 
Re: BETWEEN
Bernd Paysan <bernd.pa  2008-03-16 14:21:15 
Re: BETWEEN
Bruce McFarling <agila  2008-03-16 13:34:47 
Re: BETWEEN
Bruce McFarling <agila  2008-03-16 13:41:06 
Re: BETWEEN
Brad Eckert <nospaambr  2008-03-20 07:55:09 
Re: BETWEEN
"Ed" <nospam  2008-03-29 12:50:55 
Re: BETWEEN
Bruce McFarling <agila  2008-03-31 10:32:03 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-31 13:40:23 
Re: BETWEEN
Bruce McFarling <agila  2008-03-31 11:09:41 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-31 16:17:43 
Re: BETWEEN
Bruce McFarling <agila  2008-03-31 14:43:42 
Re: BETWEEN
Bruce McFarling <agila  2008-03-31 15:46:09 
Re: BETWEEN
Robert Spykerman <robe  2008-03-31 20:38:09 
Re: BETWEEN
Robert Spykerman <robe  2008-03-31 21:17:44 
Re: BETWEEN
"Ed" <nospam  2008-04-02 00:00:00 
Re: BETWEEN
Bruce McFarling <agila  2008-04-04 08:15:18 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-12 07:53:19 
Re: BETWEEN
Albert van der Horst <  2008-03-12 18:13:20 
Re: BETWEEN
anton@[EMAIL PROTECTED]   2008-03-13 10:17:59 
Re: BETWEEN
"Ed" <nospam  2008-03-14 13:39:47 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-14 20:01:22 
Re: BETWEEN
mhx@[EMAIL PROTECTED] (M  2008-03-14 20:15:44 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-14 20:22:52 
Re: BETWEEN
"Ed" <nospam  2008-03-15 12:05:20 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-15 13:29:06 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-13 12:29:14 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-13 11:17:54 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-13 13:30:49 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-13 11:45:23 
Re: BETWEEN
David Thompson <dave.t  2008-03-31 04:27:44 
Re: BETWEEN
Bruce McFarling <agila  2008-03-12 10:58:12 
Re: BETWEEN
Bruce McFarling <agila  2008-03-12 12:35:02 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-12 14:54:19 
Re: BETWEEN
William James <w_a_x_m  2008-03-13 11:24:23 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-13 12:52:26 
Re: BETWEEN
William James <w_a_x_m  2008-03-13 12:17:12 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-13 13:33:20 
Re: BETWEEN
anton@[EMAIL PROTECTED]   2008-03-13 19:51:14 
Re: BETWEEN
William James <w_a_x_m  2008-03-13 14:48:22 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-13 18:04:08 
c-version, was Re: BETWEEN
Albert van der Horst <  2008-03-14 09:09:50 
Re: BETWEEN
anton@[EMAIL PROTECTED]   2008-03-14 11:37:38 
Re: BETWEEN
William James <w_a_x_m  2008-03-13 14:58:01 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-13 18:17:33 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-13 16:48:39 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-13 19:14:32 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-13 17:31:16 
Re: BETWEEN
Albert van der Horst <  2008-03-14 09:30:54 
Re: BETWEEN
Aleksej Saushev <asau@  2008-03-15 02:07:32 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-14 19:21:08 
Re: BETWEEN
Aleksej Saushev <asau@  2008-03-15 14:33:26 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-15 11:29:17 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-15 11:00:02 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-15 13:34:31 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-15 11:48:39 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-15 14:02:32 
Re: BETWEEN
Aleksej Saushev <asau@  2008-03-15 21:27:37 
Re: BETWEEN
Aleksej Saushev <asau@  2008-03-15 20:15:10 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-15 13:48:20 
Re: BETWEEN
Albert van der Horst <  2008-03-16 13:43:28 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-16 11:38:32 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-15 17:11:08 
Re: BETWEEN
Aleksej Saushev <asau@  2008-03-16 04:07:29 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-14 23:44:25 
Re: BETWEEN
Aleksej Saushev <asau@  2008-03-15 15:05:03 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-15 17:36:43 
Re: BETWEEN
Aleksej Saushev <asau@  2008-03-16 04:12:06 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-14 08:19:15 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-14 14:18:34 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-18 00:00:17 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-18 12:13:01 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-18 11:41:04 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-18 16:15:39 
Re: BETWEEN
"Ed" <nospam  2008-03-15 12:40:01 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-15 10:05:21 
Re: BETWEEN
"Ed" <nospam  2008-03-16 16:56:01 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-16 08:50:11 
Re: BETWEEN
"Ed" <nospam  2008-03-18 10:48:20 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-18 00:55:08 
Re: BETWEEN
"Ed" <nospam  2008-03-20 11:36:33 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-18 00:03:13 
Re: BETWEEN
Duke Normandin <dukeof  2008-03-17 23:28:44 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-18 00:52:09 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-18 12:11:31 
Re: BETWEEN
Duke Normandin <dukeof  2008-03-18 00:51:56 
Re: BETWEEN
John Doty <jpd@[EMAIL   2008-03-17 19:10:30 
Re: BETWEEN
Duke Normandin <dukeof  2008-03-18 05:40:19 
Re: BETWEEN
Coos Haak <chforth@[EM  2008-03-18 18:32:33 
Re: BETWEEN
Duke Normandin <dukeof  2008-03-19 02:09:21 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-14 10:33:48 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-14 10:40:29 
Re: BETWEEN
William James <w_a_x_m  2008-03-14 09:21:41 
Re: BETWEEN
Bruce McFarling <agila  2008-03-14 09:49:52 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-16 10:24:22 
Re: BETWEEN
Jerry Avins <jya@[EMAI  2008-03-16 11:35:57 
Re: BETWEEN
Andrew Haley <andrew29  2008-03-17 10:37:08 
Re: BETWEEN
Bruce McFarling <agila  2008-03-20 04:32:31 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-31 17:21:03 
Re: BETWEEN
"Ed" <nospam  2008-04-05 01:28:53 
Re: BETWEEN
Jonah Thomas <jethomas  2008-03-31 18:05:58 
Re: BETWEEN
Jonah Thomas <jethomas  2008-04-04 14:46:19 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Nov 21 15:19:09 CST 2008.