The Museum of HP Calculators

HP Forum Archive 19

[ Return to Index | Top of Index ]

RPL: Binary to "long ints"?
Message #1 Posted by Mark Edmonds on 28 July 2009, 4:48 p.m.

I have to admit that I am slightly confused by the exact/approx modes of machines from the 49G onwards. I also find it slightly frustrating in that porting programs over that use display formatting get messed up by the extra decimal point.

Anyway, here is the question.

With Exact mode set ON, I don't understand why doing this doesn't result in an exact mode integer that preserves all digits:

\<< TICKS B\->R \>>

The only way round this I've found so far is to convert the result from TICKS into a string, edit out the # and base indicator and then use OBJ-\> to get it to the correct integer.

It would be a lot neater and more efficient if this conversion could be done with a single command.

Does anyone know how this would be done please?

Thanks!

Mark

      
Re: RPL: Binary to "long ints"?
Message #2 Posted by Tim Wessman on 28 July 2009, 6:54 p.m.,
in response to message #1 by Mark Edmonds

It would help a little to know what you are trying to do, but I don't think there is any way to change a hex value directly into an integer. It has always converted into a real number AFAIK.

As to the rest, use R->I commands in your display program and everything will work fine.

TW

            
Re: RPL: Binary to "long ints"?
Message #3 Posted by Mark Edmonds on 28 July 2009, 7:30 p.m.,
in response to message #2 by Tim Wessman

Thanks for the tip Tim! I didn't even know about the R->I command and I was wondering how that conversion was done.

Mark


[ Return to Index | Top of Index ]

Go back to the main exhibit hall