220 likes | 419 Views
Arrays. When handling many values using variables can be cumbersome.Daily temperature over a yearUse an array insteadAn array is a set (list) of variables represented by a single nameIndividual items (values) of the array are called elementsElements are identified through an index e.g. Days(6)
E N D
1. Visual Basic 2
2. Arrays When handling many values using variables can be cumbersome.
Daily temperature over a year
Use an array instead
An array is a set (list) of variables represented by a single name
Individual items (values) of the array are called elements
Elements are identified through an index e.g. Days(6)
Index is referenced using brackets after the array name
Note the first element has an index of 0
3. Arrays MonthDays could be an array giving the total number of days in each month. MonthDays(0) – number of days in January MonthDays(1) – number of days in February