| View previous topic :: View next topic |
| Author |
Message |
dmonckton Contributor


Joined: 09 Aug 2002 Posts: 117 Location: Lewes, U.K.
|
Posted: Mon Apr 28, 2008 9:21 pm Post subject: Combined variable name |
|
|
Hi All
How do I create a combined variable name from a passed variable?
| Code: |
#define command,whatever
whatever 7,11
:whatever
%%string%1 = blahblah
%%string%2 = pingpong
exit
|
The %%string%1 ignores the %1 so i just end up with %%string!
Can this be done?
Thanks
David.M |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1566
|
Posted: Mon Apr 28, 2008 10:08 pm Post subject: |
|
|
| I don't believe you can dynamically create a variable name like that. |
|
| Back to top |
|
 |
uvedese Contributor


Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Tue Apr 29, 2008 9:09 pm Post subject: |
|
|
Hi dmonckton,
You can not do that. I think , the only solution is to use an array of data...
| Code: | #define command,whatever
whatever 7,11
:whatever
myarray %1,blahblah
myarray %2,pingpong |
____________
visit uVeDeSe Site:
http://www.uvedese.es |
|
| Back to top |
|
 |
Aslan Valued Contributor


Joined: 31 May 2001 Posts: 589 Location: Memphis, TN USA
|
Posted: Wed Apr 30, 2008 2:52 am Post subject: |
|
|
| I'm curious, what would you need this for and what would you like the result of %%string%1 to look like? |
|
| Back to top |
|
 |
|