Chapter 5. Subroutines, Functions, and Structures

Team-Fly    

 
Visual Basic .NET Unleashed
By Paul Kimmel
Table of Contents
Part I.  Introducing Visual Basic .NET


In This Chapter

  • Writing Procedures

  • Defining Procedure Arguments

  • Working with Recursion

  • Defining Structures

  • Using Enumerated Types

  • Summary

Keywords and tokens are the atoms of computer languages. Visual Basic .NET's grammar is the equivalent of the physical laws that govern the interactions between these atoms . Statements are the molecules, and the procedures are the basic building blocks of every program.

Every object-oriented program contains classes made up of procedures that describe the behavior of the classes. The classes and the interaction of those classes define what a particular system is and does.

Chapter 5 covers functions and subroutines in depth. Because the next building block of aggregation is the structure, the Structure construct is covered in detail. Understanding how to declare, define, and implement procedures and their affiliated arguments and structures is the final precursor to advanced programming topics.

This chapter demonstrates how to define procedures and how to use the ByVal, ByRef, Optional, and ParamArray argument specifiers. The latter part of the chapter examines the Structure construct, which replaces the VB6 Type. Structure supports additional behaviors that Type doesn't support, including structure methods , constructors, and properties.


Team-Fly    
Top
 


Visual BasicR. NET Unleashed
Visual BasicR. NET Unleashed
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 222

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