The Museum of HP Calculators

HP Forum Archive 21

[ Return to Index | Top of Index ]

Unit conversions inside programs on 50g
Message #1 Posted by Chris Smith on 22 Feb 2013, 6:06 p.m.

Decided to delve accidentally into units inside a program on the 50g. After dredging the abysmal manual, I can't work out how to add a unit to top of stack value inside a program. I can do it not via a program by using the units menu, but am stumped as to how to represent it.

My stack looks like this to start with:

2: 45.5
1: 125

What I want to achieve is the following on the stack:

2: 45.5
1: 125_gal

Also does someone fancy writing HP a proper manual :-)

Any help appreciated!

      
Re: Unit conversions inside programs on 50g
Message #2 Posted by Eric Smith on 22 Feb 2013, 6:40 p.m.,
in response to message #1 by Chris Smith

How about:

1_gal *
            
Re: Unit conversions inside programs on 50g
Message #3 Posted by Chris Smith on 23 Feb 2013, 5:35 a.m.,
in response to message #2 by Eric Smith

Thanks. That did the trick perfectly. I was looking for a much more complicated solution.

I use type coercion regularly, but never thought of unit coercion!


[ Return to Index | Top of Index ]

Go back to the main exhibit hall