forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Combined variable name

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
dmonckton
Contributor
Contributor


Joined: 09 Aug 2002
Posts: 117
Location: Lewes, U.K.

PostPosted: Mon Apr 28, 2008 9:21 pm    Post subject: Combined variable name Reply with quote

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
View user's profile Send private message
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1566

PostPosted: Mon Apr 28, 2008 10:08 pm    Post subject: Reply with quote

I don't believe you can dynamically create a variable name like that.
Back to top
View user's profile Send private message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Tue Apr 29, 2008 9:09 pm    Post subject: Reply with quote

Hi dmonckton,

You can not do that. I think Rolling Eyes , 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
View user's profile Send private message Visit poster's website
Aslan
Valued Contributor
Valued Contributor


Joined: 31 May 2001
Posts: 589
Location: Memphis, TN USA

PostPosted: Wed Apr 30, 2008 2:52 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group