LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data type of preprend array size in Flatten To String block

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. 

Best regards

Oesen
0 Kudos
Message 1 of 3
(2,105 Views)

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?

0 Kudos
Message 2 of 3
(2,098 Views)

@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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,089 Views)