Terms

arglist                   [ | expr | param:=expr ][, ...]

A list of zero or more exprs that are assigned to the parameters of the procedure.

•   A positional parameter may be skipped by omitting the expression. Only optional parameters may be skipped.

•   Positional parameter assignment is done with expr. Each parameter is assigned in turn. By name parameter assignment may follow.

•   By name parameter assignment is done with param:=expr. All following parameters must be assigned by name.

arrayvar                A variable that holds an array of values. A Object variable can hold an array. Dynamic arrays can be ReDimensioned.

As [New] type        As type
-or-

As New objtype[(Of objtype[, ...])][([param[, ...]])]

Dim, Private, Public and Static statements may declare variable types using As type or As New objtype. A variable declared using As New objtype is created using a list of zero or more params.

As type                 Variable and parameter types, as well as, function and property results may be specified using As type: Boolean, Byte, Char, Date, Decimal, Double, Integer, Long, Object, SByte, Short, Single, String, UInteger, ULong, UShort, objtype, user delegate, user dialog, user enum, user structure.

The type T? is the same as System.Nullable(Of T).

attribute                A file attribute is zero or more of the following values added together.

Attribute                Value                      Description

vbNormal                0                              Normal file.

vbReadOnly           1                              Read-only file.

vbHidden               2                              Hidden file.

vbSystem                4                              System file.

vbVolume               8                              Volume label.

vbDirectory            16                            MS-DOS directory.

vbArchive               32                            File has changes since last backup.

vbAlias                    64                            File is an alias.

big-endian            Multiple byte data values (not strings) are stored with the highest order byte first. For example, the long integer &H01020304 is stored as this sequence of four bytes: &H01, &H02, &H03 and &H04. A Binary or Random file written using Put uses little-endian format so that it can be read using Get on any machine. (Big-endian machines, like the Power-PC, reverse the bytes as they are read by Get or written by Put.)

bytearray               A variable that holds an array of byte values.

caseexpr               An expression which specifies a single value or a range. Refer to the Select Case statement.

certkey                  A WinWrap Basic Certificate 8 hex-digit key.

charlist                 A group of one or more characters enclosed by [ ] as part of Like operator's right string expression.

•   This list contains single characters and/or character ranges which describe the characters in the list.

•   A range of characters is indicated with a hyphen (-) between two characters. The first character must be ordinally less than or equal to the second character.

•   Special pattern characters like ?, *, # and [ can be matched as literal characters.

•   The ] character can not be part of charlist, but it can be part of the pattern outside the charlist.

condexpr              An expression that returns a numeric result. If the result is zero then the conditional is False. If the result is non-zero then the conditional is True.

0 'false
-1 'true
X > 20 'true if X is greater than 20
S = "hello" 'true if S equals "hello"

dateexpr                An expression that returns a date result. Use #literal-date# to express a date value.

#1/1/2000# ' Jan 1, 2000
Now+7 ' seven days from now
DateSerial(Year(Now)+1,Month(Now),Day(Now))
    ' one year from now

dialogfunc            A dialog function executes while a user dialog is visible.

dimension            [lower To] upper

Array dimension.

dlgvar                   A dialog variable holds values for fields in the dialog. Dialog variables are declared using Dim dlgvar As user dialog.

expr                      An simple or complex expression that returns the appropriate result.

•   Simple: var, cond, date, num, str, obj, field, method, function (result) or property (result).

•   Complex: One or more simple expressions with parenthesises and Operators.

field                      Use .field to access individual fields in a dialog variable.

dlg.LastName
dlg.ZipCode

initialvalue            Initial value for a variable. Use { expr, ... } to create an array value.

instruction            A single command.

Beep
Debug.Print "Hello"
Today = Date

Multiple instructions may be used instead of a single instruction by separating the single instructions with colons.

X = 1:Debug.Print X
If X = 1 Then Debug.Print "X=";X:Stop
Beep ' must resume from Stop to get to here

label                     An identifier that names a statement. Identifiers start with a letter. Following chars may be a letter, an underscore or a digit. 

little-endian           Multiple byte data values (not strings) are stored with the lowest order byte first. For example, the long integer &H01020304 is stored as this sequence of four bytes: &H04, &H03, &H02 and &H01. A Binary or Random file written using Put uses little-endian format so that it can be read using Get on any machine. (Big-endian machines, like the Power-PC, reverse the bytes as they are read by Get or written by Put.)

macro                   A macro is like an application. Execution starts at the macro's Sub Main. The public symbols are accessible by other modules/macros via the '#Uses special comment.

A macro name may be suffixed with "/certkey". This insures that the macro being used has been encrypted using the Decryption certificate indicated by certkey. The following macro name

SecureMacro.wwd/00000003

is valid only if SecureMacro.wwd has been encrypted using the 00000003 Decryption certificate.

method                 An object provides methods and properties. Methods can be called as subs (the return value is ignored), or used as functions (the return value is used).

If the method name contains characters that are not legal in a name, surround the method name with [].

App.[Title$]

module                 The public symbols in the module are accessible by other modules/macros via the '#Uses special comment or a project's LoadModule statement.

•   A module is loaded on demand.

•   A code module is a code library.

•   An object module or class module implements an object.

•   A module may also access other modules with its own '#Uses special comments.

A module name may be suffixed with "/certkey". This insures that the module being used has been encrypted using the Decryption certificate indicated by certkey. The following module name

SecureModule.bas/00000003

is valid only if SecureModule.bas has been encrypted using the 00000003 Decryption certificate.

name                    An identifier that names a variable or a user defined procedure. Identifiers start with a letter. Following chars may be a letter, an underscore or a digit. 

Count
DaysTill2000
Get_Data

num                      An expression that returns a numeric result. Use &O to express an octal number. Use &H to express a hex number. The interpretation &H and &O is affected by the '#Language setting. Specific types of numbers can be indicated by using one of the endings shown in the table below:

Ending                   Description

S                              The number is a Short value.

I or %                      The number is a Integer value. The interpretation of the type is controlled by the '#Language setting.

L or &                      The number is a Long value. The interpretation of the type is controlled by the '#Language setting.

US                           The number is a UShort value.

UI                            The number is a UInteger value. The interpretation of the type is controlled by the '#Language setting.

UL                           The number is a ULong value. The interpretation of the type is controlled by the '#Language setting.

D                             The number is a Decimal value.

F or !                       The number is a Single value.

R or #                      The number is a Double value.

@                            The number is a Decimal value. The interpretation of the type is controlled by the '#Language setting.

numstr                  An expression that returns a numeric or string result.

numvar                 A variable that holds one numeric value.

objexpr                 A expression that returns a reference to an object or module.

CreateObject("WinWrap.CDemoApplication")

objtype                 A specific type defined by your application, another application or by an object module or class module.

objvar                   A variable that holds a objexpr which references an object. Object variables are declared using As Object in a Dim, Private or Public statement.

param                   [ [Optional] [ | ByVal | ByRef ] | [ByVal] ParamArray ] param[type][( )] [As type] [ = defaultvalue ]

The param receives the value of the associated expression in the Declare, Sub, Function or Property call. (See arglist.)

•   An Optional param may be omitted from the call. It must also have a defaultvalue. The parameter receives the defaultvalue if a value is not specified by the call.

•   All parameters following an Optional parameter must also be Optional.

•   ParamArray may be used on the final param. It must be an array of Object type. It must not follow any Optional parameters. The ParamArray receives all the expressions at the end of the call as an array. If LBound(param) > UBound(param) then the ParamArray didn't receive any expressions.

•   If the param is not ByVal and the expression is merely a variable then the param is a reference to that variable (ByRef). (Changing param changes the variable.) Otherwise, the parameter variable is local to the procedure, so changing its value does not affect the caller.

•   Use param( ) to specify an array parameter. An array parameter must be referenced and can not be passed by value. The bounds of the parameter array are available via LBound( ) and UBound( ).

precedence           When several operators are used in an expression, each operator is evaluated in a predetermined order. Operators are evaluated in this order:

•   ^ (power)

•   - (negate)

•   * (multiply), / (divide)

•   \ (integer divide)

•   Mod (integer remainder)

•   + (add), - (difference)

•   << (shift left), >> (shift right)

•   & (string concatenate)

•   = (equal), <> (not equal), < (less than) > (greater than), <= (less than or equal to), >= (greater than or equal to), Like, (string similarity) New, (object creation) TypeOf, (object type) Is, (object equivalence) IsNot (object non-equivalence)

•   Not (bitwise invert)

•   And (bitwise and), AndAlso (short-circuit logical and)

•   Or (bitwise or), OrElse (short-circuit logical or)

•   Xor (bitwise exclusive-or)

Operators shown on the same line are evaluated from left to right.

procedure             A subroutine, function or property.

project                  A project is a collection of modules. The public symbols are accessible by other project's via the ReferenceProject statement or #Uses comment.

The project file format:

PROJECT 10
Attribute CompileId = "..."
['#Reference ...]...
['#Language ...]
['#HelpFile ...]
[Imports ...
...]
Project projectname
    [...]...
EndProject

•   PROJECT must be at the beginning of the file. It is followed by a version number. Attribute lines follow.

•   The CompileId attribute is used with to calculate the compiled DLL's name. This attribute is required.

•   '#Reference defines references for all module in the project.

•   '#Language defines the language for all modules.

•   '#HelpFile defines the default help file for all modules.

•   Project starts the Project block.

A project name may be suffixed with "/certkey". This insures that the project being used has been encrypted using the Decryption certificate indicated by certkey. The following project name

SecureProject.wbp/00000003

is valid only if SecureProject.wbp has been encrypted using the 00000003 Decryption certificate.

property                An object provides methods and properties. Properties may be used as values (like a function call) or changed (using assignment syntax).

If the property name contains characters that are not legal in a name, surround the property name with [].

App.[Title$]

statement              Zero or more instructions. A statement is at least one line long. Begin Dialog, Do, For, If (multiline), Select Case, While and With statements are always more than one line long. A single line statement continues on the next line if it ends a line with a space and an underscore ' _'.

S = "This long string is easier to read, " + _
     "if it is broken across two lines."
Debug.Print S

Implied line continuation occurs for the current line if the last token is one of the following:

, ( { . + - * / \ ^ >> << & += -= *= /= \verb,\,= ^= >>= <<= &= > >= < <= = <> :=
And AndAlso IsIsNotLike Mod Or OrElse Xor

Implied line continuation occurs for the previous line if the first token is one of the following:

, ) }

The following is a single statement because of the implied line continuations:

i = (
    1 And
    3 Or
    8
)

str                         An expression that returns a string result.

"Hello"
S
S + " Goodbye"
S & " Goodbye"
Mid(S,2)

A string constant may have a 'C' suffix

S = "x"C

The 'C' suffix indicates that the string is one character long.

strarray                 A variable that holds an array of string values.

streamnum           An expression that returns a numeric result. Streams 1 through 255 are private to each macro. Streams 256 through 511 are shared by all macros. 

strvar                    A variable that holds one string value.

FirstName

type                      Variable and parameter types, as well as, function and property results may be specified using a type character as the last character in their name.

Type char               As Type

%                             Integer, The interpretation of the type is controlled by the '#Language setting.

&                              Long, The interpretation of the type is controlled by the '#Language setting.

!                               Single

#                              Double

@                            Decimal, The interpretation of the type is controlled by the '#Language setting.

$                              String

user delegate        User defined delegates are defined with Delegate.

user dialog           User defined dialogs are defined with Begin Dialog.

user enum            User defined enums are defined with Enum.

user structure       User defined structures are defined with Structure.

userstructurevar    A user defined structure variable holds values for elements of the user defined structure. User defined structures are defined using Structure.

•   Declare with Dim, Private, Public or Static.

•   Declare as a parameter of Sub, Function or Property definition.

var                        A variable holds either a string, a numeric value or an array of values depending on its type.

vardeclaration       name[type][([dimension[, ...]])][As [New] type]

The name declares a variable.

variantvar              A variant variable can hold any type of value or it can hold an array.