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


Groups > comp.lang.forth > #39712 > unrolled thread

NUMBER?

Started byhughaguilar96@gmail.com
First post2015-06-12 21:49 -0700
Last post2015-06-18 22:55 +0200
Articles 2 on this page of 22 — 7 participants

Back to article view | Back to comp.lang.forth


Contents

  NUMBER? hughaguilar96@gmail.com - 2015-06-12 21:49 -0700
    Re: NUMBER? hughaguilar96@gmail.com - 2015-06-12 22:48 -0700
    Re: NUMBER? "HAA" <someone@microsoft.com> - 2015-06-13 16:25 +1000
      Re: NUMBER? hughaguilar96@gmail.com - 2015-06-13 22:24 -0700
    Re: NUMBER? Michael Barry <barrym95838@yahoo.com> - 2015-06-12 23:57 -0700
      Re: NUMBER? hughaguilar96@gmail.com - 2015-06-13 22:27 -0700
        Re: NUMBER? "HAA" <someone@microsoft.com> - 2015-06-14 23:31 +1000
      Re: NUMBER? Hans Bezemer <the.beez.speaks@gmail.com> - 2015-06-16 23:29 +0200
    Re: NUMBER? Ching-Tang Tseng <ilikeforth@gmail.com> - 2015-06-13 01:39 -0700
      Re: NUMBER? hughaguilar96@gmail.com - 2015-06-13 22:31 -0700
    NUMBER? Mark Wills <markwills1970@gmail.com> - 2015-06-13 07:08 -0700
      Re: NUMBER? Michael Barry <barrym95838@yahoo.com> - 2015-06-13 08:18 -0700
        Re: NUMBER? Mark Wills <markwills1970@gmail.com> - 2015-06-14 11:34 -0700
          Re: NUMBER? coos <chforth@hccnet.nl> - 2015-06-14 22:16 +0200
    Re: NUMBER? Ching-Tang Tseng <ilikeforth@gmail.com> - 2015-06-14 15:08 -0700
      Re: NUMBER? hughaguilar96@gmail.com - 2015-06-14 15:11 -0700
        Re: NUMBER? hughaguilar96@gmail.com - 2015-06-14 15:13 -0700
        Re: NUMBER? "HAA" <someone@microsoft.com> - 2015-06-16 12:26 +1000
    Re: NUMBER? Hans Bezemer <the.beez.speaks@gmail.com> - 2015-06-16 18:48 +0200
      Re: NUMBER? "HAA" <someone@microsoft.com> - 2015-06-17 12:37 +1000
      Re: NUMBER? "HAA" <someone@microsoft.com> - 2015-06-18 22:43 +1000
        Re: NUMBER? Hans Bezemer <the.beez.speaks@gmail.com> - 2015-06-18 22:55 +0200

Page 2 of 2 — ← Prev page 1 [2]


#39825

From"HAA" <someone@microsoft.com>
Date2015-06-18 22:43 +1000
Message-ID<mlued0$6rh$1@speranza.aioe.org>
In reply to#39787
Hans Bezemer wrote:
>
> : NUMBER DUP >R IF D>S THEN R> ;        ( a n1 -- n2 +f | f)

Guessing that should read

: NUMBER DNUMBER DUP >R IF D>S THEN R> ;

Here are a few more that rely on 2's complement

\ as above but shorter  signed or unsigned  no range check
: number ( adr len -- n -1 | 0 )
  dnumber dup if nip then ;

\ unsigned single with range check
: u-number ( adr len -- u -1 | 0 )
  dnumber if 0= ?dup and exit then 0 ;

\ signed single with range check
: s-number ( adr len -- n -1 | 0 )
  dnumber if over 0< xor 0= ?dup and exit then 0 ;




[toc] | [prev] | [next] | [standalone]


#39842

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2015-06-18 22:55 +0200
Message-ID<5583304a$0$2894$e4fe514c@news2.news.xs4all.nl>
In reply to#39825
HAA wrote:

> Hans Bezemer wrote:
>>
>> : NUMBER DUP >R IF D>S THEN R> ;        ( a n1 -- n2 +f | f)
> 
> Guessing that should read
> 
> : NUMBER DNUMBER DUP >R IF D>S THEN R> ;
I stand corrected, thank you for fixing this!

Hans Bezemer

[toc] | [prev] | [standalone]


Page 2 of 2 — ← Prev page 1 [2]

Back to top | Article view | comp.lang.forth


csiph-web