- unsigned byte
- unsigned short (16 bits)
- signed word (32 bits)
- unsigned word (32 bits)
- unsigned long (64 bits)

- unsigned byte
*string is integer*and a check for a range between 0 and 255.- unsigned short
*string is integer*and a check for a range between 0 and 65535.- signed word
*string is integer*and a check for a value under 2147483648.- unsigned word
- used a regexp to ensure an unsigned string of digits and then ::math::bignum to enforce a 32-bit limit.
- unsigned long
- used a regexp to ensure an unsigned string of digits and then ::math::bignum to enforce a 64-bit limit.

*string is uint8*or

*string is uint32*but it was kind of surprising that the range of acceptable values for

*string is integer*was about one and a half times larger than the range for a signed, 32-bit, integer. That's because

*string is integer*accepts signed values and also the half range of higher unsigned values.

*escargo 16 Aug 2005*

I also note that ::math::bignum (in tcllib) makes it harder than I would like to compare bignum values with 0 and 1. A couple of built-in constants would make comparing arbitrary values to 0 and 1 much easier.

Readers of this page will want to follow TIPs 237 [2] and 249 [3].

NEM: Probably the binary command will form part or all of a solution to checking/formatting integers to particular binary representations.escargo: Ironically, I don't care about the binary representations

*on the system that is reading the input.*I just have to verify that the values conform to the specified types before sending them to a remote server. I never need the binary representations. I almost need some kind of introspection that says how many bits would it take to represent a particular value (if the value has been stored as a long, wide, or bignum interally).