1-based arrays


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: 1-based arrays

  1. #1
    Dave Guest

    1-based arrays


    Is there any chance that the next version of VB.NET will allow 1-based arrays?
    I've got about a hundred thousand lines of VB6 code that I'd like to upgrade,
    but I use arrays a lot - and 1-based arrays to boot.

    Everytime I look at converting these to 0-based arrays prior to running the
    upgrade wizard I realize it's just going to be too **** hard to convert these
    since I've really got to examine every single statement where I'm accessing
    the array. I know what I'm talking about here after converting a couple of
    my smaller projects to VB.NET. I figure about a month just to convert the
    arrays... (everything else is in good shape for upgrade though).

    And I don't want to rely on any "VB6.Compatibility" functions since this
    code will be in production for another 5-10 years at least.

    I think it's possible to leave a lot of these alone by allowing the wizard
    to convert them to 0-based arrays, and then just ignoring the 0th elements,
    but that is risky also since in many cases the arrays are being output to
    external logic such as Excel.

    Any hope? Or should I leave these alone and hope VB6 is supported for 10
    years?




  2. #2
    Phil Weber Guest

    Re: 1-based arrays

    > Is there any chance that the next version of VB.NET
    > will allow 1-based arrays?


    Dave: As far as I know, the next version of VB.NET (Everett) will not
    include any array enhancements. The following release (Whidbey) may or may
    not; I have not heard anything from Microsoft on this point (as I have
    regarding edit-and-continue).

    > I think it's possible to leave a lot of these alone by allowing
    > the wizard to convert them to 0-based arrays, and then just
    > ignoring the 0th elements, but that is risky also since in many
    > cases the arrays are being output to external logic such as Excel.


    This seems like the most promising approach. This way, you wouldn't have to
    examine each line of code that touches the arrays, you'd only have to
    examine the areas where your code interacts with Excel. Hopefully, that code
    is isolated into separate classes or modules (if not, I'd recommend you do
    so before upgrading), so it'll be easy to know where to look.
    --
    Phil Weber


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center