Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 08-08-2009
Member
 
Join Date: Dec 2008
Posts: 87
How to initialize VB Array

I'm attempting to load that byte array into the ILArray and have attempted various methods without luck. The code i have used in my program gives me an ILArray with only one row with the value "(unknown data type) and the message "End of expression expected". Visual Basic doesn't provide any way to declare an array and initialize its elements at the same time.
Reply With Quote
  #2  
Old 08-08-2009
Member
 
Join Date: Oct 2008
Posts: 180
Re: How to initialize VB Array

Try to create the ILArray with generic type of byte instead of double, reshape it afterwards to the size needed and convert it to 'double' then (if needed). This is generally a good idea so you don't have to keep track of two bounds instead of one. Obviously, in some cases you might want two bounds to match the logic of your problem.
Reply With Quote
  #3  
Old 08-08-2009
Member
 
Join Date: Feb 2008
Posts: 137
Re: How to initialize VB Array

You may add an additional condition that will also allow the function to indicate whether the passed array is initialized. This will create ILArray, having arrays of byte on each element. A fixed-size array most closely matches our CD rack anology. There are a limited number of slots you can slide CDs into. Pretend you have three CDs - one by the Deftones, another by Tool, and a third by Disturbed.
Reply With Quote
  #4  
Old 08-08-2009
Member
 
Join Date: Oct 2008
Posts: 167
Re: How to initialize VB Array

The very existence of this, and that array bounds can be set to anything you want means that you can't count on the lower bound in any technical sense. When the array has been dimensioned, the code accurately returns the current number of dimensions in the array, regardless of how large (UBound) each dimension is, or whether each dimension are all the same or of differing sizes. This would also explain the "unknown data type" message, since ILArray.ToString (which is called internally) does not know how to handle elements of byte[] array type.
Reply With Quote
  #5  
Old 10-08-2009
Member
 
Join Date: Feb 2009
Posts: 96
Re: How to initialize VB Array

show us the code so we can see it more clearly
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to initialize VB Array"
Thread Thread Starter Forum Replies Last Post
Hdd won't initialize 20phileagles Hardware Peripherals 4 11-12-2011 03:35 AM
Cant initialize to MBR Cortezz Operating Systems 3 10-09-2010 01:50 PM
How to initialize IKE Renau Technology & Internet 5 15-02-2010 09:06 AM
Assigning an array to an array MACE Software Development 3 18-11-2009 05:19 PM
External USB HD won't initialize abdulthekewl Hardware Peripherals 9 01-08-2009 08:55 AM


All times are GMT +5.5. The time now is 10:29 AM.