Size of Array ?

Results 1 to 4 of 4

Thread: Size of Array ?

  1. #1
    ASP Novice Guest

    Default Size of Array ?

    Big Jambo for everyone.<BR><BR>I&#039m trying to find out what&#039s the size of my array. (=values)<BR>I&#039ve used function Split to separate values from a <BR>String (=Strn) and then while-loop to count until <BR>values(i) is empty.<BR><BR>&#039 values = split(Strn(i), ",", -1)<BR>&#039<BR>&#039 Do <BR>&#039 <BR>&#039 n = n + 1<BR>&#039<BR>&#039 loop Until values(n) = Empty<BR><BR>Split works fine, but when loop reaches last &#039cell&#039 I get Error:<BR><BR>&#039 Subscript out of range: &#039[number: 6]&#039 <BR><BR>Why ?<BR><BR>what is the easiest way to look for a size of an array ?<BR><BR>A little help would be nice, thnx for a great site anyway .<BR><BR>

  2. #2
    BAHEK Guest

    Default RE: Size of Array ?

    If you want to find out the largest available subscript for the particular dimension, you can use function Ubound(ArrayName,Dimension)<BR>For one dimensional array it will look like this:<BR>Ubound(aArr)<BR>Usually arrays are zero based ( at least the ones I&#039ve always worked with ;) so add 1 to the number that the function will return and you got yourself a number of values that array stores.<BR>

  3. #3
    ASP Trainee Guest

    Default Thank You...

    ....Drive through . That worked Harasoo. Quite simple finally. Used a couple of hours for for-looping while while didn&#039t seem to suite. Grrrreatest thank&#039s. <BR>(...and god please save me from those ancient c-lessons in school next year.)

  4. #4
    BAHEK Guest

    Default RE: Thank You...

    XAXAXA LOL ;-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts