length of an array

how can i get the length and width of an array??????

Comments

  • You can only get the lower and upper bound
    [code]
    dim x(13 to 156) as integer

    IntegerSize = 2 ' an integer is 2 bytes

    lower = lbound(x) ' = 13
    upper = ubound(x) ' = 156
    ElementCount = upper - lower + 1
    TotalArraySize = ElementCount * IntegerSize
    [/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion