Chapter 9. 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 declaring procedures.
In general, statements don’t return a value. Therefore, you are often well-advised to wrap these statements in a custom function that can return a value you can use to determine whether a task was successful.
- 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 variablestrResult
. 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 all of a local filesystem). Because of their significance, both object models are fully documented ...
Get VBScript in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.