KMatle Expert Licensed User Longtime User Mar 3, 2022 #1 With B4X: b4r_main::_receivedmessage->length=msg.length(); one can modify the length of the given array. I use it as a buffer (255 bytes). To me it is always 255 bytes long (Globals), but... Maybe a stupid question but how is it's length reduced e.g. to 5? Is it redefined? Usually you use a length indicator but the array itsself stays 255 bytes long (as it is a buffer).
With B4X: b4r_main::_receivedmessage->length=msg.length(); one can modify the length of the given array. I use it as a buffer (255 bytes). To me it is always 255 bytes long (Globals), but... Maybe a stupid question but how is it's length reduced e.g. to 5? Is it redefined? Usually you use a length indicator but the array itsself stays 255 bytes long (as it is a buffer).
Erel B4X founder Staff member Licensed User Longtime User Mar 3, 2022 #2 I'm not sure that I understand the question. B4R Array object has a length field. You can put any value you like in this field. It will not change the actual size. Upvote 0
I'm not sure that I understand the question. B4R Array object has a length field. You can put any value you like in this field. It will not change the actual size.