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

Is this bug in parse funtion?

 [1/4] from: rebol-list2:seznam:cz at: 27-May-2003 14:16


Hello rebol-list, just wondering if this is how SKIP should work in the parse function: digits: charset "0123456789" parse "12 34" [2 digits copy x to end] probe x ;== " 34" parse "12 34" [2 digits skip copy x to end] probe x ;== "4" but I would suppose "34" -- Best regards, rebOldes

 [2/4] from: g:santilli:tiscalinet:it at: 30-May-2003 16:42


Hi rebOldes, On Tuesday, May 27, 2003, 2:16:47 PM, you wrote: r> digits: charset "0123456789" r> parse "12 34" [2 digits copy x to end] r> probe x ;== " 34" r> parse "12 34" [2 digits skip copy x to end] r> probe x ;== "4" but I would suppose "34" Try PARSE/ALL. ;-) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r

 [3/4] from: robert:muench:robertmuench at: 30-May-2003 17:02


> -----Original Message----- > From: [rebol-bounce--rebol--com] [mailto:[rebol-bounce--rebol--com]]
<<quoted lines omitted: 4>>
> just wondering if this is how SKIP should work in the parse > function:
Hi, try parse/all otherwise spaces will be skiped for strings. Robert

 [4/4] from: ingo::2b1::de at: 30-May-2003 17:34


Hi Oldes, maybe this is what your after?
>> parse/all "12 34" [2 digits skip copy x to end]
== true
>> probe x
34 == "34" in normal operation 'parse skpis all whitespace by itself. Kind regards, Ingo rebOldes wrote:

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