Post Reply 
Units48 v1.0: units the 48 way
09-14-2018, 10:55 AM (This post was last modified: 10-30-2018 04:20 PM by Didier Lachieze.)
Post: #1
Units48 v1.0: units the 48 way
Leveraging the work done on Base48, Units48 is a small app to do units calculation the 48 way.

You'll find an environment with a stack, softkeys and similar function set.

After the Preview version, here is v1.0, fixing some bugs and adding support for more key functions.

One key point is that under Units48, the [Alpha] key is redefined to act as a second shift key, similar to the [Left Shift] key on the HP 48, while the [Blue Shift] key acts as the Right Shift on the HP 48. This enables units conversion with [Alpha] [unit soft key] the same way as it is done with [Left Shift] [unit soft key] on the HP 48.

Here is a list of the key functions supported under Units48:
  • Up key: main units menu
  • Left key: similar to Prev on the 48
  • Right key: similar to Next on the 48
  • [Blue Shift]: access to the keyboard keys shift functions, and similar to [Right Shift] for the soft keys
  • [Alpha]: similar to [Left Shift] for the soft keys
  • [Blue Shift][Units]: main units menu
  • [Alpha][Units]: tools menu
  • x^y, SIN, COS, Tan, LN, LOG,x^2, +/- keys: primary and shifted functions implemented
  • 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, . , EEX keys: used for number input
  • [Blue Shift][3]: PI
  • [,]: swap the stack levels 1 and 2
  • ÷, x, -, + keys: standard operators
  • [Blue Shift][÷]: inverse
  • [Blue Shift][+]: either Undo or Import from Ans, depending on the app settings
  • Menu: either Import from Ans or Undo, depending on the app settings
  • Num: main app screen (to be used for ex. with the Home key to swap between Home and Units48)
  • [Blue Shift][Num]: app settings
  • [Blue Shift][App]: info about the app
  • Esc: exit the app
  • [Blue Shift][Esc]: clear the stack
    Added with v1.0:
  • [Toolbox]: subset of the Tool menu, with numeric functions that can be used within Units48
  • [Blue Shift][Esc]: clear the stack
  • [Apps], [Apps Info], [Home], [Home Settings], [Mem], [List], [Matrix], [Program], [Notes]: work as expected (press Num to return to Units48)

There is no documentation yet (you can refer to the Base48 documentation for the settings and import/export mechanism). Please report any bug found or any improvement you would like to see implemented.

Note1: one change from Base48 is that by default the latest stack level1 value is stored in the Home Ans and is available when you exit the app. This can be changed in the app settings.

Note2: the user key program to retrieve the app stack in RPN mode is slightly different from the one published in the Base48 documentation. Here is the updated one compatible with both Base48 and Units48:
Code:
KEY KS_Plus()
BEGIN
IF Entry==2 THEN
  RETURN ΣLIST(REVERSE(EXECON("STRING(&1)+\" \"",Stack)));
ELSE
  RETURN Ans;
END;
END;


Attached File(s) Thumbnail(s)
       

.zip  Units48_v1.0.zip (Size: 14.4 KB / Downloads: 15)
Find all posts by this user
Quote this message in a reply
09-14-2018, 12:33 PM (This post was last modified: 09-14-2018 12:34 PM by ekeppel.)
Post: #2
RE: Units48 Preview: units the 48 way
Very nice! It definitely speeds up conversions, which is what I tend to do a lot of. I wish it was easier with the Prime's built-in functions, but in my opinion doing it their way involves a lot of keystrokes. In RPN mode, converting 5 of one unit to another is: [5] [Shift] [Units] [Soft menu-Units] [Soft menu-Drill down and select FROM unit] [Enter] [Shift] [Units] [Soft menu-Drill down and select TO unit] [Enter] [Shift] [Unit] [Soft menu-Tools] [Convert] [Enter]. And if I want to also convert that same quantity to another unit, I have to go through much of that all over again. There isn't a simple [Shift] [Unit soft key] to hop between units on the fly as is possible in Units48 or on the 48/50 series calcs. :-(

Your app brings things back around to nearer to what I'm used to seeing on the 50g, which is about as efficient as it gets without dedicated unit keys like the 35s has. Thanks!

--

On the topic of unit conversion, does anyone know why Length and Energy are missing their key shortcuts in the Prime's [Units] soft menu? It would be nice to be able to enter [Shift] [Units] [2] [2] to get centimeters, for example, as is possible with most of the other unit types.

Eric
Find all posts by this user
Quote this message in a reply
09-15-2018, 07:12 AM
Post: #3
RE: Units48 Preview: units the 48 way
Excellent Didier! Thank you very much for such an excellent application, it was something very expected that could have the HP Prime and for some reason the conversion of units made it complicated in a native way, but now with your application it is super easy to make the conversions practically the same as in the series HP 48 and the HP 50g. I congratulate you and keep improving, and if I find an error or bug I will let you know so that you can correct it in future updates.

Thank you....!!!
Find all posts by this user
Quote this message in a reply
09-16-2018, 06:47 AM
Post: #4
RE: Units48 Preview: units the 48 way
Is there any way to put the command line in another color? Can it be changed with any parameter or color command?
Find all posts by this user
Quote this message in a reply
09-16-2018, 06:54 AM
Post: #5
RE: Units48 Preview: units the 48 way
Not currently. Why would you do that?
Find all posts by this user
Quote this message in a reply
09-16-2018, 11:07 AM
Post: #6
RE: Units48 Preview: units the 48 way
Hello Didier,
uau! that change my opinion on units Handling on the Prime and remind me my beloved 48!

Thanks for putting this incredible amount of work together.

Giancarlo
Find all posts by this user
Quote this message in a reply
10-26-2018, 10:13 PM
Post: #7
RE: Units48 Preview: units the 48 way
great app, thank you very much.



(09-14-2018 12:33 PM)ekeppel Wrote:  On the topic of unit conversion, does anyone know why Length and Energy are missing their key shortcuts in the Prime's [Units] soft menu? It would be nice to be able to enter [Shift] [Units] [2] [2] to get centimeters, for example, as is possible with most of the other unit types.

It looks like only dimensions with 16 units choices or less get key shortcuts, to fit in the 4x4 key area bounded by keys '7' & '+'.

Cambridge, UK
DM16, DM42, 30b (WP 34S), 50g, 50g (newRPL), Prime G2
various Casio, Rockwell 18R :)
Find all posts by this user
Quote this message in a reply
10-30-2018, 04:24 PM
Post: #8
RE: Units48 v1.0: units the 48 way
Replacing the preview version I've updated the first post with v1.0 which includes a few bug fixes and new functions:
  • [Toolbox]: subset of the Tool menu, with numeric functions that can be used within Units48
  • [Blue Shift][Esc]: clear the stack
  • [Apps], [Apps Info], [Home], [Home Settings], [Mem], [List], [Matrix], [Program], [Notes]: work as expected (press Num to return to Units48)
Find all posts by this user
Quote this message in a reply
10-30-2018, 06:10 PM
Post: #9
RE: Units48 v1.0: units the 48 way
(10-30-2018 04:24 PM)Didier Lachieze Wrote:  Replacing the preview version I've updated the first post with v1.0 which includes a few bug fixes and new functions:

Thanks for sharing Didier, another good reason to use my Prime more often! That makes several good reasons from you. While the Prime forums abound with spellbinding code about finding the 11th Prime that is also a secondary root of this or that, I find general-purpose tools like Base48 and Units48 more to my liking. But no offense meant to those folks that like to make and read the spellbinding kinds of things noted above.

Small suggestion: when distributing in a .zip file (and btw thx for that) please also include a small text file with core documentation - nothing fancy, even just copy/paste the text from the post is good enough. This makes it easier to download something and then have it all together in one file rather than either printing the post or having to copy/paste the post body to a text file and save along with the .zip file (or even insert it into).

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)