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

some parsing

 [1/2] from: semseddinm:bircom at: 24-Apr-2009 9:19


Hi, why "some" includes space chars in x?
>> parse "a b c" [copy x some ["a"] to end]
== true
>> x
== "a "
>> parse "a b c" [copy x ["a"] to end]
== true
>> x
== "a"
>> parse "a b c" [copy x "a" to end]
== true
>> x
== "a"

 [2/2] from: pwawood:g:mail at: 24-Apr-2009 14:58


Hi Semseddin On 24 Apr 2009, at 14:19, =C5=9Eemseddin Moldibi [ Bircom ] wrote:
> Hi, why "some" includes space chars in x? >>> parse "a b c" [copy x some ["a"] to end]
<<quoted lines omitted: 9>>
>>> x > == "a"
I don't know the reason that parse behaves this way, it may be a bug. =20 It seems to be something to do with the automatic whitespace handling. =20 If you use the /all refinement which lets you handle whitespaces some does what you expect.
>> parse/all "a b c" [copy x some "a" (probe x) to end]
a == true Regards Peter

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted