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

[REBOL Helpdesk] assigned #4659

 [1/1] from: lmecir::geocities::com at: 12-Oct-2000 7:06


Hi Bo, Compare: Example #1: a: [1 2] remove back tail a b: skip a 2 index? b == 2 Example #2: a: [1 2] b: skip a 2 remove back tail a index? b ** Script Error: Out of range or past end. ** Where: index? b
>From that I am concluding, That Rebol behaviour is inconsistent, because
both cases should yield the same result. My suggestion is as follows: old-index?: :index? index?: function [ {Returns the index number of the current position in the series.} series [series! port!] ] [result] [ if error? result: try [old-index? :series] [result: old-index? series: tail :series] result ] Now the result of Example#2: == 2 Andrew could enhance Rebol patches, I think. Regards Ladislav