Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: On ordinal and cardinal numbers...

From: agem:crosswinds at: 7-Jul-2001 17:23

RE: [REBOL] Re: On ordinal and cardinal numbers... reading Joel he really complains two things: a) stuff is not zero-base b) Joel would be pretty like modulo-arithmetik. i suggest a ring! make ring! 5 could be .. 0 1 2 3 4 5 6 7 8 9 .. or .. -4 -3 -2 -1 0 1 2 3 4 5 .. that means with modulo we could say zeroth: :last while usual c-programming works: while[index < length? block][..] will never touch last! since joel found explaining modulo with a clock works great, how about context clockwise[pick: .. skip: .. ..] ticktack: does bind-to clockwise[ forever[ probe first tick tick: next tick ] ] ? a more complete (complex?) version could really have ring! datatype, which could be a special reference. a: [1 2 3 4] b: make ring! a skip b 24 would work a: make ring! 4 would give us a clock-type counter with no buffer-memory. maybe even a: make clock! [24 60 60 decimal!] there are some uses.. :) Drawback: Joels char-counter would not throw exception on overflow. modulo with subrange just for 0? hm, or 7 as Joel noted. [lmecir--mbox--vol--cz] wrote:
> Hi all, > > is there a chance that Carl gets something more people can agree upon? My > idea is to have something like these: >
;-) Volker --zero is the highest number