01-22-2014 08:59 AM
Hi
The data type of the preprend array size in Flatten To String block is given as I32. Is it somehow possible to reduce the data type to I8, since the width and height of my array won't exceed 255 ?. I also need to do the same in Unflatten To String as well.
01-22-2014 09:04 AM
You could manually manipulate the string after flattening and before unflattening to subtract or add the 3 bytes. But that doesn't seem like it would be worth the effort.
Why are you concerned?
01-22-2014 09:35 AM
@Oesen wrote:
Hi
The data type of the preprend array size in Flatten To String block is given as I32. Is it somehow possible to reduce the data type to I8, since the width and height of my array won't exceed 255 ?. I also need to do the same in Unflatten To String as well.
The short answer is no. This is because the index is an I32. NI likes to keep integers as an I32 whenever possible for reasons like this.
Since you are dealing with a 2D array (width and height), it will actually use 2 I32s before the actual data.
As Ravens stated, you could put in your own array sizes before the array in the string. But it is worth saving 6 bytes? Not likely.