Appendix A. VBScript Functions and Keywords

This appendix contains a complete reference of functions and keywords in VBScript 5.6. You will also find a list of the VB/VBA functions and keywords that are not supported in VBScript. Where appropriate, an alternative to an unsupported function or keyword is shown.

Operators

An operator acts on one or more operands when comparing, assigning, concatenating, calculating, and performing logical operations.

Assignment Operator

The assignment operator is simply used for assigning a value to a variable or property.

See the Set keyword for an explanation of how to reference and assign objects.

=

Name

Assignment

 

Description

Assigns the result of an expression, the value of a constant, or the value of another variable to a variable or property

 

Syntax

Variable = value

Arithmetic Operators

The arithmetic operators are all used to calculate a numeric value, and are normally used in conjunction with the assignment operator and/or one of the comparison operators; they are listed in order of operator precedence.

^

Name

Exponentiation

 

Description

Raises a number to the power of an exponent.

 

Syntax

Result = number ^ exponentnumber and exponent is any valid numeric expression.

 

Example

MsgBox 5 ^ 5

MsgBox displays 3125, which is the result of raising the number 5 to the exponent 5.

*

Name

Multiplication

 

Description

Multiplies two numbers.

 

Syntax

Result = number1 * number2 number1 and number2 is any valid numeric expression.

 

Example

MsgBox 5 * 5

MsgBox displays 25, which is the ...

Get VBScript Programmer's Reference, Third Edition 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.