1 / 54

Microsoft Visual Basic 2008: Reloaded Third Edition

Microsoft Visual Basic 2008: Reloaded, Third Edition. 2. Objectives. After studying this chapter, you should be able to:Declare and initialize a one-dimensional arrayStore data in a one-dimensional arrayDisplay the contents of a one-dimensional arrayCode a loop using the For Each?Next statement

topper
Télécharger la présentation

Microsoft Visual Basic 2008: Reloaded Third Edition

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. Microsoft Visual Basic 2008: Reloaded Third Edition Chapter Nine Arrays

    2. Microsoft Visual Basic 2008: Reloaded, Third Edition 2 Objectives After studying this chapter, you should be able to: Declare and initialize a one-dimensional array Store data in a one-dimensional array Display the contents of a one-dimensional array Code a loop using the For Each…Next statement Access an element in a one-dimensional array Search a one-dimensional array Compute the average of a one-dimensional array’s contents

    3. Microsoft Visual Basic 2008: Reloaded, Third Edition 3 Objectives (continued) Find the highest entry in a one-dimensional array Update the contents of a one-dimensional array Sort a one-dimensional array Create and manipulate parallel one-dimensional arrays Create and initialize a two-dimensional array Store data in a two-dimensional array Search a two-dimensional array

    4. Microsoft Visual Basic 2008: Reloaded, Third Edition 4 Using Arrays Simple variable (or scalar variable): a variable that is unrelated to any other variable in memory Array: A group of variables with the same name and data type that are related in some way Used to temporarily store related data in memory Increases the efficiency of a program Commonly used arrays: One-dimensional Two-dimensional

    5. Microsoft Visual Basic 2008: Reloaded, Third Edition 5 One-Dimensional Arrays One-dimensional array: Can be viewed as a column of variables Subscript: A unique number that identifies each variable in a one-dimensional array Starts at 0 for first element in the array Use array name and subscript to refer to each individual variable in the array

    6. Microsoft Visual Basic 2008: Reloaded, Third Edition 6 One-Dimensional Arrays (continued)

More Related