[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[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!

6.6

Code help with arrays...

Asked by eghtebas in Visual Basic Programming

Tags: help, arrays

I have

Public sVal(6) As String
Public iOrder(6) As Integer
Public bAyn As Boolean, bByn As Boolean, bCyn As Boolean
Public bDyn As Boolean, bEyn As Boolean, bFyn As Boolean
Public iLastOrder As Integer, iLastIndex As Integer   '<-- haven't used, for your consideration

Permenant values for sVal() are:

sVal(1) = "A": sVal(2) = "B": sVal(3) = "C": sVal(4) = "D": sVal(5) = "E": sVal(6) = "F"

And the initial value for all items in iOrder(i) is zero.
-----------------
1. Select B (by setting bByn = True, if need to use). I do this by calling 'UpdateOrder 2' after setting iOrder(2)=1
sVal()           iOrder()
  A                   0
  B                   1       <-- most recent      
  C                   0
  D                   0
  E                   0
  F                   0

2. Select D by calling 'UpdateOrder 4' after setting iOrder(4)=1
sVal()           iOrder()
  A                   0
  B                   2       <-- becomes 2nd
  C                   0
  D                   1       <-- most recent      
  E                   0
  F                   0

3. Select A by calling 'UpdateOrder 1'  after setting iOrder(1)=1
sVal()           iOrder()
  A                   1       <-- most recent      
  B                   3       <-- becomes 3rd
  C                   0
  D                   2       <-- becomes 2nd
  E                   0
  F                   0

4. Select C by calling 'UpdateOrder 3' after setting iOrder(3)=1  
sVal()           iOrder()
  A                   2       <-- becomes 2nd      
  B                   4       <-- becomes 4th
  C                   1       <-- most recent      
  D                   3       <-- becomes 3rd
  E                   0
  F                   0

5. Select A again.  If bAyn was True, then:          (for  bAyn = False ignore it)
 by calling 'UpdateOrder 1' after setting iOrder(1)=1
sVal()           iOrder()
  A                   1       <-- most recent        
  B                   4       <-- becomes 4th
  C                   2      <-- becomes 2nd      
  D                   3       <-- becomes 3rd
  E                   0
  F                   0

I am trying to do following:

Sub  UpdateOrder(IndexVal as integer)
  Dim i as integer
  For i=1 to 6
    if i <> IndexVal And iOrder(i) > Then
       'iLastOrder As Integer, iLastIndex
       '
       if iLastOrder >= iOrder(i)  Then

           iOrder(i) = iOrder(i) + 1

       'End If
           
End Sub


Can you make this work.  New approach is fine.

Thank you.
 
 
[+][-]02/10/05 08:03 PM, ID: 13282969Accepted Solution

View this solution now by starting your 30-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: help, arrays
Sign Up Now!
Solution Provided By: Enlade
Participating Experts: 3
Solution Grade: A
 
[+][-]02/10/05 02:51 PM, ID: 13281186Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 03:01 PM, ID: 13281262Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/10/05 03:21 PM, ID: 13281397Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 03:23 PM, ID: 13281410Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/10/05 03:26 PM, ID: 13281439Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/10/05 03:29 PM, ID: 13281454Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/10/05 04:30 PM, ID: 13281863Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 06:10 PM, ID: 13282330Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/10/05 07:11 PM, ID: 13282741Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 07:16 PM, ID: 13282763Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 07:17 PM, ID: 13282772Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 07:17 PM, ID: 13282774Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/10/05 07:20 PM, ID: 13282785Author Comment

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 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02/10/05 07:26 PM, ID: 13282815Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 07:33 PM, ID: 13282853Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 07:37 PM, ID: 13282875Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 07:53 PM, ID: 13282930Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02/10/05 07:58 PM, ID: 13282950Expert Comment

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 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92