Garbage Collection

Chapter 2. Designing Modules and Procedures

Because Microsoft Visual Basic is a visual language, much of your work involves designing user interfaces. However, you still have to write code to make your application do something. Modules and procedures are the framework for the code of your application, and building this framework requires careful consideration. There are proven techniques for creating better modules and procedures, and you should use these techniques when developing your projects.

More Information

Creating classes requires a different set of considerations than creating standard modules does. The issues of creating solid, functional classes are discussed in Chapter 11, "Programming Objects."


 

You'll often hear many different terms when modules and procedures are discussed. Table 2-1 describes some of these terms.

 

Table 2-1. Common Module-Related Terms

Term

Description

Procedure

A named sequence of statements dedicated to a specific process. A procedure can have a set of parameters through which it can communicate with other portions of the program, and it can also return a value that can be used by other portions of the program. Procedure is a broad term covering Sub procedures, Function procedures, and Property procedures.

Sub procedure

A procedure declared with the keyword Sub. Sub procedures do not return values.

Function procedure

A procedure declared with the keyword Function. Function procedures return values.

Property procedure

A procedure declared with the keyword Property. Property procedures are used to create object properties that can be read, set, or both.

Routine

A generic term for a procedure.

Module

A named collection of (preferably related) procedures in a Visual Basic project.

 



Practical Standards for Microsoft Visual Basic. NET
Practical Standards for Microsoft Visual Basic .NET (Pro-Developer)
ISBN: 0735613567
EAN: 2147483647
Year: 2005
Pages: 84

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net