How to get the upper bound of an array?

Discussion in 'Javascript' started by Martin, Dec 21, 2005.

  1. Martin

    Martin Guest

    In a web page, I have a script that splits a stream of data into an
    array like so: Msgs = MyText.split("|");

    How can I find out how many Msgs were created?

    I've tried UBound in various ways but can't get anything to work:
    var UB = UBound(Msgs);
    var UB = Msgs.ubound;

    Help?
     
    Martin, Dec 21, 2005
    #1
    1. Advertising

  2. Martin

    VK Guest

    var numOfMessages = Msgs.length;
     
    VK, Dec 21, 2005
    #2
    1. Advertising

  3. Martin

    Lee Guest

    Martin said:
    >
    >In a web page, I have a script that splits a stream of data into an
    >array like so: Msgs = MyText.split("|");
    >
    >How can I find out how many Msgs were created?
    >
    >I've tried UBound in various ways but can't get anything to work:
    >var UB = UBound(Msgs);
    >var UB = Msgs.ubound;


    Stop wasting your time trying to guess. Find a manual.
     
    Lee, Dec 21, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ike

    upper bound of an array

    Ike, Nov 22, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    506
    eruth
    Nov 22, 2004
  2. sunil panda

    Lower bound & Upper bound

    sunil panda, Dec 25, 2003, in forum: Java
    Replies:
    9
    Views:
    7,253
    thushara wijeratna
    Oct 7, 2008
  3. ANM
    Replies:
    2
    Views:
    1,369
    Thomas Schodt
    Mar 7, 2004
  4. Rhiner Dan
    Replies:
    1
    Views:
    748
    Mike Wahler
    Mar 27, 2005
  5. BlackHelicopter
    Replies:
    0
    Views:
    528
    BlackHelicopter
    Jan 31, 2013
Loading...

Share This Page