![]() ![]() Now you mayīe asking, what do I do now? Each object stored in an array is called an element. So now those 100 variables turn into person(1 to 100) in a dim statement. All you have to do is dimension the array (see above). ![]() So, if you want to make a phoneīook of say, 100 people, rather than make a bunch of variables named 'person1, person2, person3.person100', you may use an array. Arrays consist of the variable name and a subscript, which is put in parentheses for computer use. Rather than make a new variable with a new name whenever you want to add a name, you can make an array. Say you want to make a phone book for your computer. The best way to look at an array is to show you one. Arrays are used to group similar data together, to make it easier to search and sort through this data. Arrays are extremely useful in Visual Basic, and are present in many other programming languages. ![]()
0 Comments
Leave a Reply. |