VBArray : VBArray « MS JScript « JavaScript Tutorial

Home
JavaScript Tutorial
1.Language Basics
2.Operators
3.Statement
4.Development
5.Number Data Type
6.String
7.Function
8.Global
9.Math
10.Form
11.Array
12.Date
13.Dialogs
14.Document
15.Event
16.Location
17.Navigator
18.Screen
19.Window
20.History
21.HTML Tags
22.Style
23.DOM Node
24.Drag Drop
25.Object Oriented
26.Regular Expressions
27.XML
28.GUI Components
29.Dojo toolkit
30.jQuery
31.Animation
32.MS JScript
JavaScript Tutorial » MS JScript » VBArray 
32.29.1.VBArray

Syntax

var variable = new VBArray(vbarray)

The VBArray object provides access to Visual Basic safeArrays.

Methods of the VBArray Object

MethodDescription
dimensions()Returns the number of dimensions in the array
getItem()Returns the item at a specified location
lbound()Returns the lowest index value of the dimension in the array
toArray()Returns a JScript array from the VBArray passed
ubound()Returns the highest index value of the dimension in the array


<html>
    <script LANGUAGE="VBScript">
    <!--
    Function myVBArray()
      Dim i
      Dim j
      Dim k
      k = 1
      Dim myArray(11)

      For i = To 1
        For j = To 1
          myArray(j, i= k
          document.writeln(k)
          k = k + 1
        Next
        document.writeln("<hr>")
      Next
      myVBArray = myArray
    End Function
    ' End Hide -->
    </script>
    <script language="JScript">
    <!--
    var myArray = new VBArray(myVBArray());
    -->

    </script>
32.29.VBArray
32.29.1.VBArray
32.29.2.VBArray.dimensions()
32.29.3.VBArray.getItem()
32.29.4.VBArray.lbound()
32.29.5.VBArray.toArray()
32.29.6.VBArray.ubound()
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.