Considering the following:

    >> flarp: "[some stuff]"
    == "[some stuff]"
    >> parse flarp [thru "[" copy bletch to "]" (print bletch)]
    some stuff
    == false

just pulls out some text between delimiters, as does

    >> flarp: "[some]"
    == "[some]"
    >> parse flarp [thru "[" copy bletch to "]" (print bletch)]
    some
    == false

quite nicely.  BUT, notice that

    >> flarp: "[]"
    == "[]"
    >> parse flarp [thru "[" copy bletch to "]" (print bletch)]
    none
    == false

does NOT fetch the expected (at least by me) zero-length string,
but rather sets bletch to none!!!!  This seems to violate the
principle that "you can get back out what you put in", as in

    >> sanity-check: func [s /local t u] [
    [    t: join "[" [s "]"]
    [    parse t [thru "[" copy u to "]" (print (s = u))]
    [    u
    [    ]
    >> sanity-check "HELLO"
    true
    == "HELLO"
    >> sanity-check "HEY"
    true
    == "HEY"
    >> sanity-check "?"
    true
    == "?"
    >> sanity-check ""
    false
    == none

-jn-

Reply via email to