[REBOL] Re: Newbie problem
From: volker:nitsch:gmai:l 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,
> cats: load %/c/farm/cats.csv
> 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.
Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem.