LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

A simple question

Hi,

I have a simple question..

When using a numeric box in hexadecimal format, I want to retain
all the bits even if the MSB nibbles are 0. (ie display all 32 bits of an
int
even if the top bits are 0). Currently it truncates everything above the
last
'1'. How can I do this?

Thanks in advance for any help

Regards

Kevin Beach
0 Kudos
Message 1 of 2
(2,897 Views)
Hi Kevin

You could use a sprintf before asigning the textbox. Use the format specifier
with a leading 0 (zero), eg:

sprintf(OutputStrPtr, "This is my int %032i", i);

regards Klaus

"Kevin Beach" wrote:
>>Hi,>>I have a simple question..>> When using a numeric box in hexadecimal
format, I want to retain>all the bits even if the MSB nibbles are 0. (ie
display all 32 bits of an>int>even if the top bits are 0). Currently it truncates
everything above the>last>'1'. How can I do this?>>Thanks in advance for
any help>>Regards>>Kevin Beach>
0 Kudos
Message 2 of 2
(2,897 Views)