Advertisement

11.22.2005 at 08:51AM PST, ID: 21639772
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

Array bounds being exceeded?

Asked by knowlton in Visual Basic Programming

Tags: ,

I am trying to maintain some code that somebody else wrote in VB 6.0.


This code compiles fine and runs fine........but I don't quite understand HOW.....because, unless my eyes deceive me, isn't the integer array   iWeight an array of 19 integers.......yet the method New(  ) (the constructor)   is looping through this array 20 times?



Public Class CRateReqSend

    Friend Const BUF_LEN = 309

    Friend Const DEFAULT_DATE = #8/5/1951#

    Friend Const iREQUEST As Int16 = 300

    Friend Const DEFAULT_INT As Int16 = -1

 

    Public Enum RateModeEnum

        rtm_LineHaul = 66

        rtm_Accessorial = 114

    End Enum

 

    Public Enum WeightClassEnum

        wcl_50 = 0

        wcl_55

        wcl_60

        wcl_65

        wcl_70

        wcl_775

        wcl_85

        wcl_925

        wcl_100

        wcl_110

        wcl_125

        wcl_150

        wcl_175

        wcl_200

        wcl_250

        wcl_300

        wcl_350

        wcl_400

        wcl_500

    End Enum

 

    Public Sub New()

        Dim i As Int16

        For i = 0 To 19

            iWeight(i) = DEFAULT_INT

        Next i

        dShipment = DEFAULT_DATE

 

        'todo: consider init iOrgChg to 0, not -1

        iOrgChg = DEFAULT_INT

    End Sub

 

    Public eRateMode As RateModeEnum

    Public sClientID As String

    Public sCarrierID As String

    Public sServiceType As String

    Public sEquipmentType As String

    Public sOrigZip As String

    Public sDestZip As String

    Public sBillTo As String

    Public iWeight(19) As Int32

    Public dShipment As Date

    Public iOrgChg As Single

End Class

 
Start Free Trial
[+][-]11.22.2005 at 08:57AM PST, ID: 15343388

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Visual Basic Programming
Tags: bounds, exceeded
Sign Up Now!
Solution Provided By: jimhorn
Participating Experts: 2
Solution Grade: A
 
 
[+][-]11.22.2005 at 09:09AM PST, ID: 15343510

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.22.2005 at 09:35AM PST, ID: 15343705

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.22.2005 at 09:46AM PST, ID: 15343776

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.22.2005 at 10:32AM PST, ID: 15344156

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.22.2005 at 10:52AM PST, ID: 15344357

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.22.2005 at 11:24AM PST, ID: 15344651

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.22.2005 at 12:28PM PST, ID: 15345220

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11.23.2005 at 05:22AM PST, ID: 15349651

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11.23.2005 at 08:46AM PST, ID: 15351514

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32