Hi,
I am looking for a function that gives the number of bits (or bytes) that a given data type uses on disk and could not find it so far. LV types use constant number of bits for each specific data type, e.g. a string is always 8 bit, a single numeric is 32 bit and a double is 64 bit. It would be helpful to have a function that takes any data type as input and gives back the number of bits used to save the data on disk.
With this function one could write VIs that read/write binary files generic. Without this function I have one VI that reads double numerics from a binary file (e.g. the 4th number is on positioin 4*8) and a different VI to read an U8 numeric (the 4th number is on poistion 4*1). The only difference between those two VIs is the constant for a doulbe (8 bytes) and a U( (1 byte).
So basically I would prefer the "GetNumberofBytesOfDataType.vi" shown at the bottom of the attached example implemented as a LabVIEW native function.
Regards,
TT
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.