|
sav Wanderer
Joined: 09 Jan 2006 Posts: 86
|
Posted: 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.. |
|
|
|
Full Throttle Wanderer
Joined: 07 Dec 2004 Posts: 65
|
Posted: 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 |
|
|
|
|
|