Hi.

gforth:
0 0 10 within . -1  ok
-1 0 10 within . 0  ok
9 0 10 within . -1  ok
10 0 10 within . 0  ok

Michael

Am 12.09.2012 um 14:43 schrieb Hannu Vuolasaho:

>
> Hello!
>
> I had standard :
> Secretariat
>
> Computer and Business Equipment Manufacturers Association
> Approved:  March 24, 1994
> American National Standards Institute, Inc.
>
> open in my browser and it says:
>
> 6.2.2440 WITHIN
> CORE EXT
> ( n1|u1 n2|u2 n3|u3 -- flag )
>
> Perform a comparison of a test value n1|u1 with a lower limit n2|u2  
> and
> an upper limit n3|u3, returning true if either (n2|u2 < n3|u3 and
> (n2|u2 <= n1|u1 and n1|u1 < n3|u3)) or (n2|u2 > n3|u3 and
> (n2|u2 <= n1|u1 or n1|u1 < n3|u3)) is true, returning false
> otherwise. An ambiguous condition exists if n1|u1, n2|u2, and n3|u3  
> are
> not all the same type.
>
> See:
> A.6.2.2440 WITHIN
>
>
> Just for the record.
>
> Best regards,
> Hannu Vuolasaho
>
>> Date: Wed, 12 Sep 2012 08:08:01 +0200
>> From: ew.fo...@nassur.net
>> To: amforth-devel@lists.sourceforge.net
>> Subject: Re: [Amforth] Bug
>>
>> Hello Artur,
>>
>> I think you are pointing to "within" not working as you expect.
>>
>>> ver
>> amforth 4.6 ATmega328P ok
>>> 0 0 10 within .
>> -1  ok
>>> -1 0 10 within .
>> 0  ok
>>> 9 0 10 within .
>> -1  ok
>>> 10 0 10 within .
>> -1  ok
>>
>> Looking into Conklin, Rather -- Forth Programmer's Handbook
>> (3rd. Edition) p.59:
>>
>> WITHIN ( x1 x2 x3 -- flag )
>> return true if x1 is greater than or equal to x2 AND less than
>> x3. ...
>>
>> So x3 is excluded in the "true" case. As you can see above,
>> "within" in amforth includes x3. Now, someone needs to check
>> "The Standard". :-)
>>
>> Thanks for pointing this out.
>>
>> Cheers,
>> Erich
>>
>> On 09/10/2012 04:31 PM, Arthur Ivanov wrote:
>>> Hi !
>>>
>>> I think I see a bug in your AmForth v4.9.
>>> In file ..\core\words\to-lower.asm I see
>>>
>>> ; ( C --  c) ; String
>>> ; if C is an uppercase letter convert it to lowercase
>>> VE_TOLOWER:
>>>       .dw $ff07
>>>       .db "tolower",0
>>>       .dw VE_HEAD
>>>       .set VE_HEAD = VE_TOLOWER
>>> XT_TOLOWER:
>>>       .dw DO_COLON
>>> PFA_TOLOWER:
>>>       .dw XT_DUP
>>>       .dw XT_DOLITERAL
>>>       .dw 'A'
>>>       .dw XT_DOLITERAL
>>>       .dw 'Z'
>>>       .dw XT_WITHIN
>>>       .dw XT_DOCONDBRANCH
>>>       .dw PFA_TOLOWER0
>>>       .dw XT_DOLITERAL
>>>       .dw $20
>>>       .dw XT_OR PFA_TOLOWER0:
>>>       .dw XT_EXIT
>>>
>>> This will not convert Z chat to lower case.
>>> To fix you have to replace the string
>>>       .dw 'Z'
>>> by the string
>>>       .dw 'Z'+1
>>>
>>>                             Ethereal
>>>
>>> -------------------------------------------------------------------- 
>>> ----------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond.  
>>> Discussions
>>> will include endpoint security, mobile security and the latest in  
>>> malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> Amforth-devel mailing list for http://amforth.sf.net/
>>> Amforth-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>>
>>
>> --------------------------------------------------------------------- 
>> ---------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond.  
>> Discussions
>> will include endpoint security, mobile security and the latest in  
>> malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> Amforth-devel mailing list for http://amforth.sf.net/
>> Amforth-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/amforth-devel
>                                       
> ---------------------------------------------------------------------- 
> --------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond.  
> Discussions
> will include endpoint security, mobile security and the latest in  
> malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Amforth-devel mailing list for http://amforth.sf.net/
> Amforth-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/amforth-devel


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to