to-block mold "(foo" or... str: "(foo" if type? str = string! [ to-block mold str]
----- Original Message ----- From: "Izkata" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, October 09, 2005 3:09 PM Subject: [REBOL] Re: Re, Re: Parse problem > > > > > Hi Patrick, > > > >>>> to-block "(foo" > > PPln> ** Syntax Error: Missing ) at end-of-script > > PPln> ** Near: (line 1) (foo > > > > PPln> It seems like a bug to me. > > > > Not a bug. REBOL needs to convert the data to valid REBOL values, > > which (foo isn't. > > > > This comes up from time to time, but it's just a distinction we need > > to acknowledge; there are times when we'll need to use string parsing, > > rather than block parsing, even though it's more effort. > > There is a (kinda) workaround: (Remembered from a "why does a word have > spaces" question years ago) > > >> to-word "(foo" > == (foo > >> X: append [] to-word "(foo" > == [(foo] > >> ? X/1 > X/1 is a word of value: (foo > > When you just 'to-block (or 'load) the string, Rebol sees the ( and thinks > it's a paren, but if it doesn't matter, or a paren isn't what you want... > Thar ye go! > > -Izzy > > -- > To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject. > -- To unsubscribe from the list, just send an email to lists at rebol.com with unsubscribe as the subject.
