Hi Gregg,

thanks, it works very well for my needs. I remembered to use something
like set and get but not exactly enough to get it to work.

Thorsten


On Sun, 5 Mar 2006 13:22:37 -0700, "Gregg Irwin"
<[EMAIL PROTECTED]> said:
> 
> Hi Thorsten,
> 
> TM> How can i create words dynamically from the content of a block and
> use
> TM> these words for filling them up with new content like this:
> 
> TM> words: [ "phhtmcl" "phhocml" ]
> TM> content: [ "phhtmcl/111" "phhocml/222" "phhtmcl/333" "phhocml/444"]
> ...
> TM> These words should be filled with with an other foreach loop on the
> TM> content-block, where the first part is the indicator in which word
> the
> TM> content should stored an the second one ist the content itself. how
> can
> TM> i use these created words in the following scriptparts? 
> 
> Something like this?
> 
> >> words: [ "phhtmcl" "phhocml" ]
> == ["phhtmcl" "phhocml"]
> >> content: [ "phhtmcl/111" "phhocml/222" "phhtmcl/333" "phhocml/444"]
> == ["phhtmcl/111" "phhocml/222" "phhtmcl/333" "phhocml/444"]
> >> foreach word words [set to word! word copy []]
> == []
> >> foreach cmd content [word-val: parse cmd "/" append get to word! first 
> >> word-val load seco
> nd word-val]
> == [222 444]
> >> phhtmcl
> == [111 333]
> 
> The long line that parses the command and loads the data will no doubt
> need some tuning, and would benefit from being broken apart, but you
> get the idea.
> 
> Now, what I have to ask is: What is the real goal and use? I know if
> often seems easy to expose REBOL, load files and just DO them. If
> that's the case, then why the string formats? If the goal is for users
> to create files that make the app more dynamic, why not use a dialect?
> 
> -- Gregg                         
> 
> -- 
> To unsubscribe from the list, just send an email to 
> lists at rebol.com with unsubscribe as the subject.
> 

-- 
http://www.fastmail.fm - A fast, anti-spam email service.

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to