HP Forums

Full Version: I'm having some problems with integer definitions...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using the Beta, but I suspect these issues are not release based.

The rules for specifying values in different bases are not consistent.

e.g. To specify a number in hex, octal, decimal and binary are #0h, #0o, #0d and #0b respectively.
From the command line, the lower case letters are used, but in programs, you need to use Upper case letters to define the base.

Also, I can't seem to specify the number of bits. I thought it was #0d32, but from the command line this is getting converted to #0d*32 and in programs it's getting converted to the hex number d32 (I think hex is in my settings somewhere)....

So, how do I specify the number of bits. I did see in the user manual #0:b in one spot, but I tried the colon and it didn't seem to work (from the command line).

OK, I've figured out the upper/lower case issues.
The base is always in lower case (in programs and in command line). I was confused with that because the # went to my default base of hex, which needed an upper case D to define the integer.

So, values are always using upper case letters in hex.

e.g. #19d is 19 decimal, but #19Dh is 19D hex.

However, I still don't know how to specify the number of bits in the integer. I know I can use SETBITS, but I need to know how to express it in the integer value, like #19h32.
#19:16d 19 decimal 16bits
#19D:16h 19D hex 16bits
That works! Also, you cannot use #19D:h. You must put a number before the base if using the :

Thank you!
Reference URL's