## Monday, January 31, 2022

### HP Prime: Custom Menu Using a User Key

HP Prime: Custom Menu Using a User Key

Steps:

1.  Create a new program.  Press [ Shift ], [ Esc ] (Clear) to clear the default text.

2.  Press [ Menu ] and select 4.  Create User Key.  Press a key combination.

3.  Use a CHOOSE command to create a pop up menu.   Enclose commands in a string.  For mathematical expressions, use parenthesis.   You may need to test commands.

4.  Use the RETURN command to return a user's choice.

Press [ Shift ], [ Help ] (User), < your user key>

Template:

BEGIN

...

CHOOSE(var, "Custom Menu", list of commands)

RETURN list(var);

END;

The following is an example menu with the following commands:

1.  DDAYS - days between dates (yyyy.mmdd)

3.  QPI - find an exact representation of a floating number

4.  approx - approximate an exact number

5.  B→R - base number to real number

6.  R→B - real number to base number

7.  *(π/180) - convert from degrees to radians

8.  *(180/π) - convert from radians to degrees

9.  rectangular_coordinates - convert polar coordinates to rectangular coordinates (Geometry app).  Use a vector or a complex number.

A.  polar_coordinates - convert rectangular coordinates to polar coordinates (Geometry app).  Use a vector a complex number.   The angle symbol is found by [ Shift ], [ × ]

I use the Toolbox key.

KEY K_Math()

BEGIN

LOCAL LM, I;

"QPI()","approx()","B→R()","R→B()",

"*(π/180)","*(180/π)",

"rectangular_coordinates()",

"polar_coordinates()"};

RETURN LM(I);

END;

Add any commands you like.  Defining a list before hand.   I hope you find this useful.

All original content copyright, © 2011-2022.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

### Casio fx-CG50: Sparse Matrix Builder

Casio fx-CG50: Sparse Matrix Builder Introduction The programs can create a sparse matrix, a matrix where most of the entries have zero valu...