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

[REBOL] Re: for bug?

From: rotenca:telvia:it at: 17-Jun-2002 22:47

Hi Joel, some notes about this thread (also to clear my looping mind :-): 1) it is strange, but your simulation code is more slow on my system (W98 - Celeron 333 view 1.2.1.3.1 and beta 1.2.5.3.1) than the standard simulated 'for
>>race 500000
0:00:03.52 0:00:04.01 2) neither your code can check this case: for i #"^(00)" #"^(01)" 256 [] the code should do an additional test of this type (with positive bump): if old => old + bump [break] 3) the right solution should be a consistent math overflow error with all scalar datatype! and not a pseudo-random [error wrap stop bug] like it is in the actual implementation (bug is for the time! datatype!) :-) 4) I always think that for i #"^(00)" #"^(ff)" 1 [] should stop at #"^(ff)", with or without math overflow and with or without wrap, so 'for should check the end condition at the end of the loop and before adding the bump value. 5) a while or until loop is the best mode to do what 'for should do, so one can directly control what happens (and a rebol for loop is always slower than a rebol while/until loop) --- Ciao Romano