Microsoft Office Tutorials and References
In Depth Information
Chapter 2. Preliminaries
Chapter 2. Preliminaries
We begin with some general facts related to programming and programming languages that will
help to give the main subject matter of this topic some perspective. After all, VBA is just one of
many programming languages, and anyone who wants to be a VBA programmer should have
some perspective on where VBA fits into the greater scheme of things. Rest assured, however, that
we will not dwell on side issues. The purpose of this chapter is to give a very brief overview of
programming and programming languages that will be of interest to readers who have not had any
programming experience, as well as to those who have.
2.1 What Is a Programming Language?
Simply put, a programming language is a very special and very restricted language that is
understood by the computer at some level. We can roughly divide programming languages into
three groups, based on the purpose of the language:
• Languages designed to manipulate the computer at a low level, that is, to manipulate the
operating system (Windows or DOS) or even the hardware itself, are called low-level
languages . An example is assembly language.
• Languages designed to create standalone applications, such as Microsoft Excel, are
highlevel languages . Examples are BASIC, COBOL, FORTRAN, Pascal, C, C++, and Visual
• Languages that are designed to manipulate an application program, such as Microsoft
Excel, are application-level languages. Examples are Excel VBA, Word VBA, and
Those terms are not set in concrete and may be used differently by others. However, no one would
disagree that some languages are intended to be used at a lower level than others.
The computer world is full of programming languages—hundreds of them. In some cases,
languages are developed for specific computers. In other cases, languages are developed for
Table 2-1. Some Programming Languages
Language General Purpose
ALGOL An attempt to design a universal language
BASIC A simple, easy-to-learn language designed for beginners
C, C++ A very powerful languages with excellent speed and control over the computer
COBOL A language for business programming
FORTRAN A language for scientific programming and number crunching
Lisp A language for list processing (used in artificial intelligence)
Pascal A language to teach students how to program "correctly"
SIMULA A language for simulating (or modeling) physical phenomena
Smalltalk A language for object-oriented programming
Visual Basic A version of BASIC designed for creating Windows applications
A version of C++ designed for creating Windows applications