> > a: "12345" > > > > probe index? find a => 3 > > > > probe copy/part a 3 => "123" > > > > probe copy/part a find a "3" => "12" > > > > I expected 3 being the return value of -find a "3"- as it > is the index > > of the series returned by the fuction find but Rebol works > differently > > considering it the "end position" > > > > yes, maybe a bit confusing, but handy behavior. We are [...]
Petr, don't forget many of us are coming from other languages where the standard working is "the return value from a function is the argument of another". When I think the return value of "find" is 3 and it goes as argument to copy/part I suppose it would be the same of writing 3 by hand copy 3 chars from the position A is pointing to. Instead Rebol is different and interprets it as the ending position. I would have written this into the manual in VERY LARGE BLINKING FONT as I have read it at least 5 times without noticing this working. > I think that Core documentation tried to explain series > concept nicely. > What I would probably do is to create some gotchas category, > describing exactly those small details, which might take you > tens of minutest to debug ... It is the reason I have written this message. As mediocre Rebol Programmer I could give a point of view on the documentation that the Pro Rebol coders don't have. Giuseppe Chillemi -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
