Array Element Size Question

Hi I am writing code for an output queue and I wanted to know if there is a functional limit to the amount of data (size) of an Array Element?

For example I have a chuck of data frames that I am putting into an output queue. Can I just append them all to one Array(1) element for example and not have to worry about hitting a limit per element? Right now I am manually breaking up my packets so either way isn’t a big deal. Just curious.

Thanks!

Do you mean something like arr( 0 ) = arr( 0 ) + newData? If so, no, it’s the same limitation as for a string, and I think that’s limited by RAM only.

However, as your string grows, appending in this way will get slower and slower, the same as if you used a straight string variable. You are better off appending each new string to the end of an array and joining them later. (Though it’s hard to advise without seeing your code or knowing exactly what you’re trying to accomplish.)

An array can hold a theoretical maximum of 2,147,483,647 elements. In practice, you’ll run out of memory long before you run out of space in an array.

Thanks guys! That is a whole lot of Bytes and I have nothing to worry about size wise then. Thanks Andrew!

Kem basically I will have a binary string of about 30 bytes max which is small in comparison to Andrew’s post :slight_smile: Sorry I should have been more descriptive in my earlier post :slight_smile: I was in a rush this AM to post since we are finalizing our documents for our Cisco audits beginning tomorrow. :slight_smile:

Thanks!