Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi Brandon,
Yes - outputing a 10 chracter ascii string to a file using the write() command thus :
buf="1234567890';
write(fid, buf);
When I open the resulting text file in hex editor it shows :
31 00 32 00 33 00 34 00 35 00 36 00 37 00 36 00 etc.
The customer, however, does not want to see any end of string markers (0x00); they follow every character when viewed in hex editor. Is this normal ?
Does this make sense ?
Regards,
Andy
Thanks Brandon.
Very helpful. I will try this.
Also, some fields I need to write out to the file contain integer values.
Are integers and character strings written out in the same way within ACL ?
Regards,
Andy
Hi Brendon,
Do I use pack("S*", buf) for 16bit unsigned short integer value ?
The help states S as an unsigned short (16–bit) value but no mention of integer.
Regards,
Andy
Hi Brendon,
I need to convert to Big Endian 16bit unsigned integer.
Is this pack("n*", buf) ? or should I use S* ? The value could be 64
I also need to convert to Big Endian 32bit unsigned integer.
Is this pack("N*",buf) ? Value could be 0, 1 or 2.
Furthermore, how do I specify an unused byte ?
Many Thanks,
What is your email address ? - be easier than working through the forum.
Many Thanks
Andy