CrazyBoy's VBScripting lectures

If we talk about scripting languages, we can not forget to speak about VBScripting.

VBScripting is Microsoft's Visual Basic Scripting Edition, the newest member of the Visual Basic family of programming languages. It brings active scripting to a wide variety of environments, including Web client scripting in Microsoft Internet Explorer and Web server scripting in Microsoft Internet Information Server.

In Almost all the automation tools(Be it QTP, RFT, Test Complete or anyone) VBScripting is used.

Here in this thread I will explain basic concepts of VBScripting. Hope this will help all the CE members to get an insight to VBScripting.

For all the queries I have started a separate thread: #-Link-Snipped-#

-CB

PS: I would be taking reference tutorial material from: #-Link-Snipped-#

Replies

  • Anil Jain
    Anil Jain
    Re: CrazyBoy's VBScripting luctures

    What is a script?
    Script is a lightweight programming language
    Set of commands to place logic in Web pages, servers or standalone applications
    A programming language that has does not follow strict programming standards (I.e. no need to end each line with a semi-colon)
    A programming language that is interpreted instead of compiled.

    What is VBScript?
    A scaled-down or subset of the Visual Basic language
    Created by Microsoft
    A scripting language that allows you to add logic to a variety of environments.

    -CB
  • Anil Jain
    Anil Jain
    Re: CrazyBoy's VBScripting luctures

    What Are VBScript Data Types?
    VBScript has only one data type called a Variant. A Variant is a special kind of data type that can contain different kinds of information, depending on how it's used. As, Variant is the only data type in VBScript, it's also the data type returned by all functions in VBScript. At its simplest, a Variant can contain either numeric or string information. A Variant behaves as a number when you use it in a numeric context and as a string when you use it in a string context. That is, if you're working with data that looks like numbers, VBScript assumes that it is numbers and does the thing that is most appropriate for numbers. Similarly, if you're working with data that can only be string data, VBScript treats it as string data. Of course, you can always make numbers behave as strings by enclosing them in quotation marks (" ").

    Variant Subtypes
    Beyond the simple numeric or string classifications, a Variant can make further distinctions about the specific nature of numeric information. These different categories of information that can be contained in a Variant are called subtypes. Most of the time, we can just put the kind of data we want in a Variant, and the Variant behaves in a way that is most appropriate for the data it contains.

    Following are the subtypes of data that a Variant can contain.
    Empty - Variant is uninitialized. Value is 0 for numeric variables or a zero-length string ("") for string variables.
    Null - Variant intentionally contains no valid data.
    Boolean - Contains either True or False.
    Byte - Contains integer in the range 0 to 255.
    Integer - Contains integer in the range -32,768 to 32,767.
    Currency -922,337,203,685,477.5808 to 922,337,203,685,477.5807.
    Long - Contains integer in the range -2,147,483,648 to 2,147,483,647.
    Single - Contains a single-precision, floating-point number in the range -3.402823E38 to -1.401298E-45 for negative values; 1.401298E-45 to 3.402823E38 for positive values.
    Double - Contains a double-precision, floating-point number in the range -1.79769313486232E308 to -4.94065645841247E-324 for negative values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values.
    Date (Time) - Contains a number that represents a date between January 1, 100 to December 31, 9999.
    String - Contains a variable-length string that can be up to approximately 2 billion characters in length.
    Object - Contains an object.
    Error - Contains an error number.

    -CB

You are reading an archived discussion.

Related Posts

OK. Frankly I slept during 'Saawariya' ,and so was the next movie and this time around the name itself says that guy out there is a lazy butt. He looks...
We all are tech savy people. Since our engineering days, we learned that, what should be the configuration of the computer and how much it will cost us. We learnt...
Hey guys does any 1 have solution manual of error control coding, shu lin. if any 1 have it plz send it to me on my email id
Program Structure of C , CPP , JAVA , C# click to view Program Structure
There is a feature 'Rate this thread' for every thread. I wonder how many of CEan's knows about this feature and how many of those use these feature. This link...