Data types and structures

  • String, character
  • Numeric (integer and real) variables
  • Graphical objects
  • Boolean variables
  • 1D arrays

All code examples are given in Visual basic. You can find more about this topic in chapter 2 of “How to Pass NATIONAL 5 Computing Science”

  • String – text variable like name
    • DIM name as String
  • Integer – a round number used for number of people or items
    • DIM age as Integer
  • Real – contains decimals used for distances or measurements
    • DIM length as Single
  • Graphical objects – pictures
  • Boolean variables – Yes or No
    • DIM Quit as Boolean
  • 1D arrays – used for a variable with many pieces of data all of the same data type.
    • DIM Pupilname (20) as String

Leave a Reply

Your email address will not be published. Required fields are marked *