Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
sav
Wanderer


Joined: 09 Jan 2006
Posts: 86

PostPosted: Sat Sep 02, 2006 8:59 am   

2 stringlists
 
Ok, i can't give any specific examples cuz i'm just trying to see if its possible and its still like a half formed idea in my head.

I have 2 different variable strings. Lets name them A and B.
What i need to do is take each item from string A and try to 'combine' it with each different item in string B.


e.g.
variable A: apple|banana|cherry
variable B: donkey|elephant|falcon

combine apple and donkey
combine apple and elephant
combine apple and falcon
combine banana and donkey
combine banana and elephant
etc

until the combination is successful.

think anyone can help me with this? thanks..
Reply with quote
Full Throttle
Wanderer


Joined: 07 Dec 2004
Posts: 65

PostPosted: Sat Sep 02, 2006 2:52 pm   
 
try

#loop 1,%numitems(apple|banana|cherry) {#forall {donkey|elephant|falcon} {combine %item("apple|banana|cherry",%i) and %%i}}

combine apple and donkey
combine apple and elephant
combine apple and falcon
combine banana and donkey
combine banana and elephant
combine banana and falcon
combine cherry and donkey
combine cherry and elephant
combine cherry and falcon
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net