Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Declaring a vaiable from the results of an array

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,29878
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> Declaring a vaiable from the results of an array
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Declaring a vaiable from the results of an array - 1/13/2006 9:40:14 AM   
  neilbarker100

 

Posts: 2
Score: 0
Joined: 1/13/2006
Status: offline
Is it possible to declare a variable from looping through an array.
For example, if I have a 2d array which looks like the following:

2,23
5,2
88,3

Is it possible to loop through the array and populate variables called:

v2 = 23
v5 = 2
v88 = 3

I'm going to then use an if statement to say;
if v5 > 0 and v2 > 0 then .....

Is this possible to do? only I can't make it work.
 
 
Post #: 1
 
 RE: Declaring a vaiable from the results of an array - 1/13/2006 9:55:02 AM   
  ebgreen


Posts: 5069
Score: 31
Joined: 7/12/2005
Status: offline
It is possible using the Execute command, but using a dictionary or some other data structure is a much better way.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to neilbarker100)
 
 
Post #: 2
 
 RE: Declaring a vaiable from the results of an array - 1/13/2006 11:08:46 AM   
  neilbarker100

 

Posts: 2
Score: 0
Joined: 1/13/2006
Status: offline
Would you please be able to show me an example of what you are talking about?

(in reply to ebgreen)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> Declaring a vaiable from the results of an array Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts