Visual Basic 2008 Programming: Business Applications with a Design Perspective
Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9
Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Appendix A Appendix B Appendix C Home
Last change: February 13 2016 18:48:19.

Table of Contents

 Chapter in PDF

Chapter 1: Introduction
Last change: February 13 2016 18:48:20.

Visual Basic as a Language and as a Processor

You have learned that VB is a programming language used to write programs to make the computer perform desired tasks. It has its own vocabulary and grammatical rules (syntax). These elements can be combined to form a program, which is the complete set of instructions designed to perform the defined tasks.
You have also learned that the program you write in the VB language will need to be processed by a VB language processor, which is also a computer program. In most instances, the VB language processor is also referred to as Visual Basic. When one states that you can write a program in VB 2008, he is expressing that you can write a VB 2008 program that VB 2008 (the processor) can understand and process. As such, the term Visual Basic can actually mean two different things—the language and the processor—in different contexts, or the language and the processor at the same time.
When you are developing a VB program, you will work with a software program that does more than just process your program. It provides an environment in which you can draw the visual interface, write the code, compile and test the program, and make additional changes. For VB 2008, this processor is recognized as the Visual Studio Integrated Development Environment (IDE), which is actually capable of handling not just VB 2008 but also several other languages.  The IDE will be explored further in Chapter 2, “Visual Basic Programming Concepts.”


Statement and Code

A VB program can consist of many instructions. An instruction that is complete in meaning and can stand alone like a sentence is recognized as a statement. Usually, you will use a line to write a statement. Some statements are very long. In such cases, the statement can be spanned over several lines. The mechanic of spanning a statement over multiple lines is explained in Chapter 2. Statements in a program are collectively recognized as code. The following sample code fragment comes from Chapter 7, “Repetition:”

For I = 0 To lstNames.SelectedItems.Count – 1 ‘Show names selected Console.WriteLine(lstNames.SelectedItems(I)) Next I

Each line in this code is complete in meaning and, therefore, is a statement.

Last change: February 13 2016 18:48:21.