I suppose the problem (d\st) here is that #NUll byte.
But is there another way to prevent the problem without using Rset and Trim ?
Thanks
Code: Select all
Structure TEST
StructureUnion
st.s{#MAXPNAMELEN * 2}
io.s{#MAXPNAMELEN}[2]
EndStructureUnion
EndStructure
Global d.TEST, s.s{#MAXPNAMELEN}
;s="a string shorter then 32" ;s doesn't help while s => s.s{#MAXPNAMELEN}
;d\io[0]=s
;d\io[0]="a string exact length of 32 byte"
d\io[0]="a string shorter then 32"
d\io[1]="added to a string longer then 32.."
Debug d\io[0]
Debug d\io[1]
Debug d\st ;both io are only kept if io[0] is at least 32 bytes long
d\st="a string shorter then 32 added to a string longer then 32.."
Debug d\io[0]
Debug d\io[1]