[REBOL] Re: Newbie problem
From: volker:nitsch:gma:il at: 3-Feb-2005 6:40
As Carl said, it should be the copy.
foreach cat cats [
cururl: replace baseurl "@" cat
fname: join %/c/farm/level1/ cat
; print cururl ;<-good idea :)
print baseurl ;<- try that too ;)
write fname read cururl
]
You will find baseurl changes the first time. because 'replace does
not copy. and then there is no more "@" to replace.
cururl: replace COPY baseurl "@" cat
On Wed, 2 Feb 2005 12:04:00 -0800, Kai Peters <[kpeters--vu-ware--com]> wrote:
> Hi all,
>
> in my script below i would expect cururl to have a different value for each
> iteration. It does, however, retain its =A0value from the first iteration.
> I vaguely remember there being a newbie trap because of some Rebol feature
> but can't for the life of me not remember where ....
>
> Anyone can help me fix this script?
>
> Thanks in advance,
> Kai
>
> rebol[]
>
> cats: load %/c/farm/cats.csv
>
> baseurl:
> http://protect-the-innocent.net/recherches/standard.php?zyp_id=0&Zip_City=ke
> lowna&Zip_Displayed=100&Zip_InClientsList=1
>
> &Zip_Langue=en&Zip_Page=1&Zip_Produit=@&Zip_Scope=1&Zip_StartPoint=0&Zip_Sou
> rce=1&Zip_Type=cat&laville=ke
>
> lowna&Zip_Prov=BC&
>
> foreach cat cats [
> =A0 cururl: replace baseurl "@" cat
> =A0 fname: =A0join %/c/farm/level1/ cat
> ; print cururl
> =A0 write fname read cururl
> ]
>
> --
> To unsubscribe from the list, just send an email to rebol-request
> at rebol.com with unsubscribe as the subject.
>
--
-Volker
Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem.
David
Wheeler