VBScript Glossary

download VBScript Glossary

of 7

Transcript of VBScript Glossary

  • 8/2/2019 VBScript Glossary

    1/7

    VBScript GlossaryActiveX control

    An object that you place on a form to enable or enhance a user's interactionwith an application. ActiveX controls have events and can be incorporated into

    other controls. The controls have an .ocx file name extension.

    ActiveX object

    An object that is exposed to other applications or programming tools through

    Automation interfaces.

    Argument

    A constant, variable, or expression passed to a procedure.

    ArrayA set of sequentially indexed elements having the same type of data. Each

    element of an array has a unique identifying index number. Changes made toone element of an array do not affect the other elements.

    ASCII Character SetAmerican Standard Code for Information Interchange (ASCII) 7-bit character

    set widely used to represent letters and symbols found on a standard U.S.keyboard. The ASCII character set is the same as the first 128 characters (0

    127) in the ANSI character set.

    Automation object

    An object that is exposed to other applications or programming tools throughAutomation interfaces.

    Bitwise comparisonA bit-by-bit comparison of identically positioned bits in two numeric

    expressions.

    Boolean expression

    An expression that evaluates to either True or False.

    By reference

    A way of passing the address, rather than the value, of an argument to aprocedure. This allows the procedure to access the actual variable. As a

    result, the variable's actual value can be changed by the procedure to which itis passed.

    G.C.Reddy, Test Consultant & Faculty 1

  • 8/2/2019 VBScript Glossary

    2/7

    By valueA way of passing the value, rather than the address, of an argument to a

    procedure. This allows the procedure to access a copy of the variable. As aresult, the variable's actual value can't be changed by the procedure to which

    it is passed.

    character codeA number that represents a particular character in a set, such as the ASCII

    character set.

    ClassThe formal definition of an object. The class acts as the template from which

    an instance of an object is created at run time. The class defines theproperties of the object and the methods used to control the object's

    behavior.

    Class moduleA module containing the definition of a class (its property and methoddefinitions).

    Collection

    An object that contains a set of related objects. An object's position in thecollection can change whenever a change occurs in the collection; therefore,

    the position of any specific object in the collection may vary.

    Comment

    Text added to code by a programmer that explains how the code works. In

    Visual Basic Scripting Edition, a comment line generally starts with anapostrophe ('), or you can use the keyword Rem followed by a space.

    Comparison operatorA character or symbol indicating a relationship between two or more values or

    expressions. These operators include less than (=), not equal (), andequal (=).

    Is is also a comparison operator, but it is used exclusively for determining ifone object reference is the same as another.

    Constant

    A named item that retains a constant value throughout the execution of aprogram. Constants can be used anywhere in your code in place of actual

    values. A constant can be a string or numeric literal, another constant, or anycombination that includes arithmetic or logical operators except Is and

    exponentiation. For example:

    Const A = "MyString"

    G.C.Reddy, Test Consultant & Faculty 2

  • 8/2/2019 VBScript Glossary

    3/7

    Data rangesEach Variant subtype has a specific range of allowed values:

    Subtype Range

    Byte 0 to 255.

    Boolean True or False.

    Integer -32,768 to 32,767.

    Long -2,147,483,648 to 2,147,483,647.

    Single -3.402823E38 to -1.401298E-45 for negative values;1.401298E-45 to 3.402823E38 for positive values.

    Double -1.79769313486232E308 to -4.94065645841247E-324 for

    negative values; 4.94065645841247E-324 to

    1.79769313486232E308 for positive values.

    Currency -922,337,203,685,477.5808 to 922,337,203,685,477.5807.

    Date January 1, 100 to December 31, 9999, inclusive.

    Object Any Object reference.

    String Variable-length strings may range in length from 0 to

    approximately 2 billion characters.

    Date expression

    Any expression that can be interpreted as a date. This includes anycombination of date literals, numbers that look like dates, strings that look

    like dates, and dates returned from functions. A date expression is limited tonumbers or strings, in any combination, that can represent a date from

    January 1, 100 through December 31, 9999.

    Dates are stored as part of a real number. Values to the left of the decimal

    represent the date; values to the right of the decimal represent the time.Negative numbers represent dates prior to December 30, 1899.

    Date literalAny sequence of characters with a valid format that is surrounded by number

    signs (#). Valid formats include the date format specified by the localesettings for your code or the universal date format. For example, #12/31/99#

    is the date literal that represents December 31, 1999, where English-U.S. isthe locale setting for your application.

    In VBScript, the only recognized format is US-ENGLISH, regardless of theactual locale of the user. That is, the interpreted format is mm/dd/yyyy.

    G.C.Reddy, Test Consultant & Faculty 3

  • 8/2/2019 VBScript Glossary

    4/7

    Date separatorsCharacters used to separate the day, month, and year when date values are

    formatted.

    EmptyA value that indicates that no beginning value has been assigned to a

    variable. Empty variables are 0 in a numeric context, or zero-length in a

    string context.

    Error number

    A whole number in the range 0 to 65,535, inclusive, that corresponds to theNumber property of the Err object. When combined with the Name property

    of the Err object, this number represents a particular error message.

    ExpressionA combination of keywords, operators, variables, and constants that yield astring, number, or object. An expression can perform a calculation,

    manipulate characters, or test data.

    Intrinsic constant

    A constant provided by an application. Because you can't disable intrinsicconstants, you can't create a user-defined constant with the same name.

    Keyword

    A word or symbol recognized as part of the VBScript language; for example, astatement, function name, or operator.

    LocaleThe set of information that corresponds to a given language and country. A

    locale affects the language of predefined programming terms and locale-

    specific settings. There are two contexts where locale information isimportant:

    The code locale affects the language of terms such as keywords

    and defines locale-specific settings such as the decimal and listseparators, date formats, and character sorting order.

    The system locale affects the way locale-aware functionality

    behaves, for example, when you display numbers or convert strings todates. You set the system locale using the Control Panel utilities

    provided by the operating system.

    G.C.Reddy, Test Consultant & Faculty 4

  • 8/2/2019 VBScript Glossary

    5/7

    Nothing

    The special value that indicates that an object variable is no longer associatedwith any actual object.

    NullA value indicating that a variable contains no valid data. Null is the result of:

    An explicit assignment ofNull to a variable.

    Any operation between expressions that contain Null.

    Numeric expressionAny expression that can be evaluated as a number. Elements of the

    expression can include any combination of keywords, variables, constants,and operators that result in a number.

    Object typeA type of object exposed by an application, for example, Application, File,

    Range, and Sheet. Refer to the application's documentation (Microsoft Excel,Microsoft Project, Microsoft Word, and so on) for a complete listing of

    available objects.

    pi

    Pi is a mathematical constant equal to approximately 3.1415926535897932.

    PrivateVariables that are visible only to the script in which they are declared.

    ProcedureA named sequence of statements executed as a unit. For example, Function

    and Sub are types of procedures.

    Procedure levelDescribes statements located within a Function or Sub procedure.

    Declarations are usually listed first, followed by assignments and otherexecutable code. For example:

    Sub MySub() ' This statement declares a sub procedure block.

    Dim A ' This statement starts the procedure block.A = "My variable" ' Procedure-level code.

    Debug.Print A ' Procedure-level code.End Sub ' This statement ends a sub procedure block.

    Note that script-level code resides outside any procedure blocks.

    G.C.Reddy, Test Consultant & Faculty 5

  • 8/2/2019 VBScript Glossary

    6/7

    PropertyA named attribute of an object. Properties define object characteristics such

    as size, color, and screen location, or the state of an object, such as enabledor disabled.

    Public

    Variables declared using the Public Statement are visible to all procedures in

    all modules in all applications.

    Run time

    The time when code is running. During run time, you can't edit the code.

    Run-time error

    An error that occurs when code is running. A run-time error results when a

    statement attempts an invalid operation.

    ScopeDefines the visibility of a variable, procedure, or object. For example, a

    variable declared as Public is visible to all procedures in all modules.Variables declared in procedures are visible only within the procedure and

    lose their value between calls.

    SCODE

    A long integer value that is used to pass detailed information to the caller of

    an interface member or API function. The status codes for OLE interfaces andAPIs are defined in FACILITY_ITF.

    Script levelAny code outside a procedure is referred to as script-level code.

    Seed

    An initial value used to generate pseudorandom numbers. For example, theRandomize statement creates a seed number used by the Rnd function to

    create unique pseudorandom number sequences.

    String comparison

    A comparison of two sequences of characters. Unless specified in the functionmaking the comparison, all string comparisons are binary. In English, binary

    comparisons are case-sensitive; text comparisons are not.

    G.C.Reddy, Test Consultant & Faculty 6

  • 8/2/2019 VBScript Glossary

    7/7

    String expressionAny expression that evaluates to a sequence of contiguous characters.

    Elements of a string expression can include a function that returns a string, astring literal, a string constant, or a string variable.

    Type library

    A file or component within another file that contains standard descriptions of

    exposed objects, properties, and methods.

    Variable

    A named storage location that can contain data that can be modified duringprogram execution. Each variable has a name that uniquely identifies it within

    its level of scope.

    Variable names:

    Must begin with an alphabetic character.

    Can't contain an embedded period or type-declaration

    character.

    Must be unique within the same scope.

    Must be no longer than 255 characters.

    G.C.Reddy, Test Consultant & Faculty 7