Windows Scripting
  Home arrow Windows Scripting arrow Page 4 - VBScript: Array Functions
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? 
WINDOWS SCRIPTING

VBScript: Array Functions
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 9
    2008-05-05

    Table of Contents:
  • VBScript: Array Functions
  • Arrays
  • Multi-Dimensional Arrays
  • Array Functions
  • UBound and LBound
  • The Join Function

  • 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


    VBScript: Array Functions - Array Functions


    (Page 4 of 6 )

    Simply put, array functions allow you to, well...perform functions on arrays. Mind boggling, I know. For starters, we will begin with the most obvious:

    The Array Function

    The array function takes a list of comma-separated values and stores them in an array. Here it is at work:


    dim myArray

    myArray=Array(100, 200, 300, 400, 500)

    document.write(myArray(1))

    This results in the print out:

      200

    Remember: the first value in an array has the index number 0.

    IsArray?

    The IsArray function asks whether something is an array. If it is, it returns a Boolean True; if not, it returns a Boolean False. Here is the science:


    <html>

    <body>

    <script type="text/vbscript">

    dim super(5)

    super(0)="I"

    super(1)="Am"

    super(2)="Iron"

    super(3)="Man"

    dim villain

    villain="Dr. Doom"

    document.write(IsArray(super)) & "<br />"

    document.write(IsArray(villan))

    </script>

    </body>

    </html>

    And the result:

      True

      False

    More Windows Scripting Articles
    More By James Payne


       · Thanks for stopping by to read my article. In this episode we discuss Array and...
       · I get that the Split function splits strings and arrays, but you're not very clear...
     

    WINDOWS SCRIPTING ARTICLES

    - More Windows Scripting Workarounds from Nilpo
    - Overloading Methods and More in VBScript
    - Improving MFC for Windows Vista
    - Regular Expressions in VBScript
    - Working with Dates in WMI
    - Completing Calendars with VBScript Date Func...
    - Building Calendars with VBScript Date Functi...
    - Working With Dates and Times in VBScript
    - Designing WCF DataContract Classes Using the...
    - Understanding Dates and Times in VBScript
    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...





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