Summary


Subroutines and functions let you break an application into manageable, reusable pieces. A subroutine performs a series of commands. A function performs a series of commands and returns a value.

Property procedures use paired functions and subroutines to provide the behavior of a simple property using routines.

These form the fundamental building blocks of the procedural part of an application. Chapters 15 through 19 explain the other half of an application’s structure, the objects that encapsulate the application’s behavior. Together, the program’s objects and its procedural subroutines and functions define the application.

This chapter explains how to break an otherwise unwieldy expanse of code into subroutines and functions of manageable size. However, the chapters so far have not explained how to write anything other that straight-line code that executes one statement after another with no deviation. Most programs need to follow more complex paths of execution, performing some statements only under certain conditions and repeating others a given number of times. Chapter 7 describes the statements that a Visual Basic program uses to control the flow of code execution. These include decision statements (If Then Else, Select Case, IIF, Choose) and looping statements (For Next, For Each, Do While, While Do, Repeat Until).




Visual Basic 2005 with  .NET 3.0 Programmer's Reference
Visual Basic 2005 with .NET 3.0 Programmer's Reference
ISBN: 470137053
EAN: N/A
Year: 2007
Pages: 417

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