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

[REBOL] Re: Newbie parsing problem (cont'd)

From: richard:coffre:francetelecom at: 3-Apr-2002 8:18

Thanks a lot. One more question not related to Rebol but I'm french and I don't know the origin of the word foo which is often used in IT books. Could you tell me more ? ;-) Richard -----Message d'origine----- De : Joel Neely [mailto:[joel--neely--fedex--com]] Envoy=E9 : mardi 2 avril 2002 20:31 =C0 : [rebol-list--rebol--com] Objet : [REBOL] Re: Newbie parsing problem (cont'd) Hi, Richard, COFFRE Richard FTO wrote:
> I'm sorry but I don't manage to use your example. > > I include it like below > > texte: read/lines file > > foreach line parse/all texte "^/" >
There's the problem. In my simple example, the word SAMPLE was set to a single string, and I used parse/all sample "^/" to break that single string into a block of "lines". In your case, you've obtained the value of TEXTE via READ/LINES, so it's already a block of lines.
> But I have the following error : > Script: "get_request_name.r" (29-Mar-2002) > Filename? noms_requetes.txt > ** Script Error: Expected one of: string! - not: block! > ** Near: foreach line parse/all texte "^/" >
That error message is essentially complaining that parse/all foo "^/" needs for FOO to be a string, not a block. In your case just use foreach line texte [ etc. -jn-