1 / 22

Visual Basic 2

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)

noe
Download Presentation

Visual Basic 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    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

More Related