Topic 5.3.1: Fundamentals

  • Keywords

    • Keywords are words with special meaning in a programming language.In Visual Basic, keywords are reserved; that is, they cannot be used as tokens for such purposes as naming variables and subroutines.
    • Examples Keywords: IF, FOR, NEXT, WHILE, DIM, ELSE, EACH.
  • Identifiers

    • Identifiers are names that programmers choose for their methods, variables, constants, objects, and so forth. An identifier must begin with a letter or an underscore.
    • Identifiers cannot clash with keywords. Thus, you cannot create a variable named Integer or Dim.
    • In addition, Visual Basic .NET identifiers are not case-sensitive, so myVariable and MyVariable are treated as the same variable names(See example below).
    • Example: Dim myVariable As Integer
  • Operators

  • Example

    • Dim a As Integer = 10
    • Dim b As Integer = 20
    • Dim Ans As Integer
    • Ans = a + b

Last modified: Wednesday, 1 April 2020, 3:24 PM