DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine variable array length?

Solved!
Go to solution

I am writing a piece of code that is manipulating the Root Description.  Here's what I have.   :

 

Dim DescriptionArray

DescriptionArray = Split(RootPropGet("description"), " ", -1, 1)

 

 

After this command, I now want to figure how long (how many items) DescriptionArray has.  What is the command for that?

 

Thanks,

Brian 

0 Kudos
Message 1 of 3
(5,864 Views)
Solution
Accepted by topic author Brian E

Hello Brian!

 

The command is UBound. It gives you the highest index of the array. Because VBS starts with index 0 you have to add 1 to get the count.

 

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
Message 2 of 3
(5,853 Views)
Thanks.  This is what I was looking for.
0 Kudos
Message 3 of 3
(5,841 Views)