Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old April 11th, 2008, 06:27 PM
cavebear cavebear is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 cavebear User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 55 sec
Reputation Power: 2
Question Do I always have to declare a two dimensional array?

Do I always have to declare a two dimensional array?

A variant does not allow me to assign it two dimensions.

Is there a way?

Reply With Quote
  #2  
Old April 11th, 2008, 06:58 PM
LyonHaert's Avatar
LyonHaert LyonHaert is offline
Arcane Scribbler
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2005
Location: Indianapolis, IN
Posts: 1,593 LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level)LyonHaert User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 13 h 14 m 58 sec
Reputation Power: 364
This might work out better if you show some code of what you're trying to do.

Other than seeing code, I can say this: A variant variable can be assigned any type, but you can't just dynamically change that type.
__________________
Joel B Fant - LyonHaert.net

2 + 2 is... 10... in base 4

Reply With Quote
  #3  
Old April 11th, 2008, 08:39 PM
medialint's Avatar
medialint medialint is offline
spirit duplicator
Click here for more information.
 
Join Date: Apr 2004
Location: \\Firecrate\
Posts: 12,299 medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)medialint User rank is General 23rd Grade (Above 100000 Reputation Level)  Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1Folding Points: 232541 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 4 Months 3 Weeks 4 h 42 m 21 sec
Reputation Power: 2547
There's a post around here where I showed what you can and can't do. It's pretty well explained in Help/MSDN under arrays. On my way out but if I have time later I'll see if I can dig up that other post and link and try to clarify.
__________________
medialint.com

"Energy has the opportunity to change the climate if it's done right." - Sen. John Ensign, R-Nev. (quoted out of context)

Reply With Quote
  #4  
Old April 12th, 2008, 08:38 AM
cavebear cavebear is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 cavebear User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 55 sec
Reputation Power: 2
Private t, tI, tII, tIID(1 To 3, 1 To 7), tGr(1 To 3, 1 To 7)

I do not want my tiid and tgr to be always 1 to 7 , but I want the dimension to expand, depending on the data, so I would not have empty cells.

So if i would have four rows, I want the demension to be only four.
Thanks

Last edited by cavebear : April 12th, 2008 at 10:35 AM.

Reply With Quote
  #5  
Old April 12th, 2008, 11:15 AM
zynder's Avatar
zynder zynder is offline
Not much of a contributor
Dev Shed Novice (500 - 999 posts)
 
Join Date: Aug 2006
Location: Hidden
Posts: 800 zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)zynder User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 140447 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140447 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140447 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140447 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140447 Folding Title: Super Ultimate Folder - Level 1Folding Points: 140447 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 1 Week 2 Days 22 h 6 m 32 sec
Reputation Power: 647
Send a message via Yahoo to zynder
I'm afraid you can't do this dynamically. You basically can't define the array index value with a variable. You got to think of another approach.

Reply With Quote
  #6  
Old April 14th, 2008, 09:12 PM
cavebear cavebear is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 34 cavebear User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 43 m 55 sec
Reputation Power: 2
something like
Do until tGr = empty
a=a+1
...
Loop

to exclude empty cells

No way to make a dynamical array.

Thank you very much.

Last edited by cavebear : April 14th, 2008 at 09:15 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Do I always have to declare a two dimensional array?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway