Meaning of the length part is different depending on the type. Fix string's length means actual number of bytes. Fix array's length will be number of elements. Anyway here needs a switch(type).