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

[REBOL] [Find] Frustration with Find

From: pwawood:mango:my at: 1-Nov-2004 9:10

I'm finding the behaviour of 'find to be a little counter intuitive. When the value being searched for isn't found find returns none! rather than the tail of the index. I wanted to code like : str: "abcde" if not tail? str: find str "1" [......] However this throws up a script error as the value of str is set to none! and it is now "disconnected" from the series!
>> str: "abcde"
== "abcde" if not tail? str: find str "1" [......] ** Script Error: tail? expected series argument of type: series port bitset ** Near: if not tail? str: find
>> type? str
== none! I'd appreciate any comments and insight on why find returns a none! value in these circumstances? Regards Peter