Simple Types

From Progzoo
Jump to navigation Jump to search

There are several basic types that are common to most programming languages:

  • Integers
    • These are whole numbers such as 0, 1, 2 also negative numbers such as -1
  • Strings
    • A string is just a sequence of characters such as "Andrew was here"
  • Floating point numbers
    • A floating point number can include a fractional part for example 2.5 or -3.928
  • Booleans
    • A boolean variable can take one of two values: true or false