|
Post by Walt Decker on Sept 1, 2022 11:33:01 GMT -5
Although the LEN() function will correctly report the number of bytes contained in a structure it will not correctly report the number of bytes contained in the elements of the structure:
STRUCT tRecord, _ Rdate AS CHAR[11], _ A AS USHORT
StructLen = LEN(tRecord.struct) '<--- reports 13
ElmLen1 = LEN(tRecord.Rdate.struct) '<--- reports 0; should be 11 ElmLen2 = LEN(tRecord.A.struct) '<--- reports 0; should be 2
However, if the elements are populated LEN() reports the number of characters in each element, not the size of the elements.
Perhaps LB should have a SIZEOF() function that will accurately report the size of the structure and the size of its elements.
|
|