O'Reilly logo

VBScript in a Nutshell, 2nd Edition by Ron Petrusha, Matt Childs, Paul Lomax

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. The Language Reference

The elements of the VBScript language can be broken into four main areas: statements, functions, operators, and object models.

Statements

Statements form the cornerstone of the language. You’ll notice in Appendix A that the largest concentration of statements is in the program structure section. Statements are used mainly for such tasks as declaring variables or procedures.

Functions

In general, functions return a value, although, as with any function, you can choose to ignore the return value.

Operators

An operator connects or performs some operation upon one or more language elements to form a single expression. For example, in the code fragment:

                     strResult = 16 + int(lngVar1)

the addition operator (+) combines 16 and the value returned by int(lngVar1) into a single expression whose value is assigned to the variable strResult. Operators are not documented in this chapter but are listed in Appendix C.

Object models

An integral part of VBScript is the Microsoft Scripting Runtime, which provides an add-on library containing the Dictionary object (which is similar to a Perl associative array) and the FileSystemObject object (which provides access to a local filesystem). Because of their significance, both object models are fully documented in this book.

VBScript is a high-level language and, like all high-level languages, it is a large yet rich language. While this means that it takes time for new users to understand the intricacies of the functions and statements ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required