LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

Non-decimal integer formats should be padded with the correct number of zeroes by default

Status: New

As already partially mentioned in a very old discussion here, the integer display formats should have more typical defaults:

 

  • If I change an integer to hexadecimal, octal, or binary format, I want it padded with zeroes on the left and the default number of digits corresponding to the data type (e.g. U8: 8 digits for binary (%08b) and 2 digits for hex (%02x), U32: 32 digits for binary (%032b), etc. ).

 

These formats should appear whenever I switch formats from decimal and I can immediately change them to anything else if desired. If the current format is not decimal and is at the default for the current datatype, the format should adapt (e.g. more or less digits shown) if the datatype (e.g. U8>>I32) is changed.

 

1 Comment
fabric
Active Participant
Great idea. I wish I had a dollar for every time I've padded a hex integer with zeros! I suggest that this be the default behaviour for block diagram constants too 🙂