Multidimensional Array assignment statement

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2006
Posts: 5
Reputation: Vorpal is an unknown quantity at this point 
Solved Threads: 0
Vorpal Vorpal is offline Offline
Newbie Poster

Multidimensional Array assignment statement

 
0
  #1
May 27th, 2009
G'Day.
If I use:
aTemp=Array(Array(0,1),Array(2,3))
I can reference the elements as:
aTemp(0)(0) etc.

How can I create an assignment statement so that I can address the array elements as:
aTemp(0,0) etc.

Yes, I know that I can use multiple assignment statements, but I'm hoping that there is a way to do it in one.

--Vorpal
Reply With Quote Quick reply to this message  
Join Date: Mar 2009
Posts: 910
Reputation: vb5prgrmr will become famous soon enough vb5prgrmr will become famous soon enough 
Solved Threads: 167
vb5prgrmr vb5prgrmr is offline Offline
Posting Shark

Re: Multidimensional Array assignment statement

 
0
  #2
May 27th, 2009
Okay, the closest you are going to get as far as I know is...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim aTemp(0 to 1, 0 to 1) As Integer
But then you would have to do...
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. aTemp(0,0) = 1
  2. aTemp(1,0) = 2
  3. aTemp(0,1) = 3
  4. aTemp(1,1) = 4

Good Luck
If anyone has helped you solve your problem, please mark your thread as solved.

Thanks
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 309 | Replies: 1
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC