Hi Eric,

Your revision works better than my revision. In programming, beginnings and
endings can often be real stinkers :-)

Thanks a lot for your help.

Regards,


Bernie Schneider
Systems Analyst
CIBER, Inc.
303-224-4159
[EMAIL PROTECTED]

> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, December 21, 1999 6:05 PM
> To:   [EMAIL PROTECTED]
> Subject:      [REBOL] Parsing Paragraphs Re:
> 
> 
> Hi Bernie,
> 
> I think your new version will append NONE to A if the file ends with
> "^/^/", and if the file ends with "^/", only the last paragraph in A
> will end with "^/".
> 
> How about:
> 
> parse read b [
>   some [copy c to "^/^/" (append a c) any "^/"]
>   [
>     end  |
>     [copy c to "^/" | copy c to end ](append a c)
>   ]
> ]
> 
> Lot of bother for the last paragraph!
> 
> Eric
> 
> -----
> 
> >Hi,
> >
> >Whoops! Just noticed that the "works like a charm" parse statement misses
> >the last paragraph sometimes.
> >
> >I modified this:
> >
> >    parse read b [some [copy c to "^/^/" (append a c) any "^/"] to end ]
> >
> >to this:
> >
> >    parse read b [some [copy c to "^/^/" (append a c) any "^/"] copy c to
> >end (append a c)]
> >
> >and it seems to work. I'm still trying to understand this type of parse
> >statement better, so until I do, I may still have to tweak it a little.
> >
> >Regards,
> >
> >
> >Bernie Schneider
> >Systems Analyst
> >CIBER, Inc.
> >303-224-4159
> >[EMAIL PROTECTED]

Reply via email to