BrainDump
  Home arrow BrainDump arrow Understanding Variables in VBScript
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

Understanding Variables in VBScript
By: Nilpo
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2008-03-18

    Table of Contents:
  • Understanding Variables in VBScript
  • Variable Names and Scope
  • Initializing and Debugging Variables
  • Data types

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Understanding Variables in VBScript


    (Page 1 of 4 )

    In VBScript, as with any programming language, it is extremely important to familiarize yourself with variables and how they work. Variable usage in VBScript is highly simplified, but before we begin, let’s take a look at what variables are exactly.

    Much like their mathematical cousins, in programming, variables are used to reference some piece of data.  In programming, that data is stored in memory and a variable serves as a reference to the memory address where the data is located.

    As their name implies, variables are dynamic.  Values can be assigned and reassigned at any time throughout their lifespan.  Unlike some other programming languages, variables in VBScript do not need to have a value assigned to them when they are initialized, although this is a common practice.

    Understand the difference between variables and constants:  the value of a variable can be changed while the value of a constant cannot be changed once it has been initialized.

    You should also be aware of data types.  As with any programming language, multiple data types exist, however, all variables are of type Variant.  This means that you do not need to declare a data type when initializing a variable and that you may change the data type associated with it at any time.

    This comes as both a blessing and a curse.  On one hand, you can perform data type conversions on the fly, which can prevent a lot of runtime errors.  On the other hand, these “behind the scenes” conversions can often produce some pretty unexpected results.

    More BrainDump Articles
    More By Nilpo


       · If you plan to master any programming language, it's a good practice to develop a...
     

    BRAINDUMP ARTICLES

    - Firefox on Windows Mobile
    - Microsoft`s Sneaky Firefox Add-On Installati...
    - Microsoft`s Answer to Google Search - Bing
    - Doing Statistical Analysis with MS Excel
    - Extracting Google-Indexed Web Site Pages Usi...
    - Advanced String Manipulation Using MS Excel
    - Using Goal Seek and Solver in MS Excel
    - Internet Explorer 8: A Hands-on View
    - Tools for Beginning Game Developers
    - XAMPP: Tips for Running an Apache/MySQL Serv...
    - Improving Your Visual Studio Workspace
    - A Look at Microsoft`s Mobile Operating System
    - Microsoft Internet Explorer 8: Mixed Reactio...
    - Configuring WSUS 3.0 on Windows Server 2008
    - Migrating to Windows Server 2008





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT