Arrays PowerPoint PPT Presentation

presentation player overlay
1 / 6
About This Presentation
Transcript and Presenter's Notes

Title: Arrays


1
Arrays
  • Fundamentals of Programming
  • AGCE ICT

2
Arrays
  • What are arrays?
  • Why use arrays?
  • What types of arrays are there?
  • How do you define an array?

3
What are arrays?
  • Like variables, arrays store data. Unlike
    variables, they can store more than one piece of
    information at a time.
  • They are like a block of garages

4
Why use arrays?
  • Arrays reduce the need for declaring lots of
    variables for each piece of related information
    you want to store in your program.
  • Control arrays make code neater and therefore
    easier-to-understand and faster to run.

5
Types of arrays
  • There are five main data types in VB

Control
String
Currency
Currency
String
String
Data Types
Boolean
Boolean
Number (e.g. Integer, Decimal)
Number (e.g. Integer, Decimal)
Date
Date
6
Defining arrays
Before you can use an array, you need to define
it first. This tells the program what the array
is called, what data type it is and how big is
the array.
Dim arrayname(size) As datatype
Arrays are Global (available to all forms) by
default.
Write a Comment
User Comments (0)
About PowerShow.com