0

As the title says, I have created an array;

Dim intArray(6) As Integer

How can you calculate the range of an element? For example, using numbers, how do you find the range of intArray(3) if you want that element to be between a number range 2 to 5 and on array element intArray(5) to be between the range of 4 to 8? I just want to do this an easy way using loops and with stored arrays if possible, thanks

3
  • 4
    I don't understand what you're asking about. Not even a thing... Commented Nov 22, 2013 at 2:42
  • Can you try again to explain exactly what you are trying to do, this is making little to no sense. an element of an array like you are showing as an example is a single item, it does not have a range, your array does. Commented Nov 22, 2013 at 2:48
  • I'm sorry if i'm not clear guys, I actually asked a question early before, but I got really confused with the answers I got, here is the link to my question stackoverflow.com/questions/20134383/… Commented Nov 22, 2013 at 3:01

2 Answers 2

1

Going by your other question and this one. I would hazard a guess that a series of NumericUpDown controls to get your input would help. You can set the minimum, maximum and interval of each one. Now all your values are validated and in the ranges you want, ready to put into your array.

Sign up to request clarification or add additional context in comments.

Comments

0

Unless I've miss read the question you want to calculate the range of the values in an array.

dim Range as integer

Range = intArray.max - intArray.min

1 Comment

Also the number of element of the array is: intArray.getlength(0)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.