HP Forums

Full Version: A simple Entry Mode Switcher...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
... with visual feedback. Probably the simplest program so far, it's a key definition.
Code:
// Cycles over entry mode options. 
KEY K_On() 
BEGIN 
LOCAL an:={"Textbook","Algebraic","RPN"}; 
Entry:=(Entry+1)MOD3; 

STARTVIEW(-8,1); // Out to ANY AVAILABLE view... 
STARTVIEW(-1,1); // ... and back in, to refresh 

TEXTOUT_P(an(Entry+1),G0,2,207,2,RGB(255,0,0)); 
END;
Very simple.
VERY useful.
VERY NICE!

Thanks for sharing.
+1 nice job!
+2 Simple and powerful - well done
How do you run this? I'm new to running HP Prime programs.
Thanks!
(05-10-2014 05:16 AM)darwin513 Wrote: [ -> ]How do you run this? I'm new to running HP Prime programs.
Thanks!

Once you have copied the program in the Program Catalog, activate the user keyboard by pressing SHIFT HELP ("1U" will be displayed when activated), then press the customized key, ON in this case. More info: User Guide page 516. Easy as π.
(05-11-2014 12:21 AM)Cristóbal De Jesús Wrote: [ -> ]
(05-10-2014 05:16 AM)darwin513 Wrote: [ -> ]How do you run this? I'm new to running HP Prime programs.
Thanks!

Once you have copied the program in the Program Catalog, activate the user keyboard by pressing SHIFT HELP ("1U" will be displayed when activated), then press the customized key, ON in this case. More info: User Guide page 516. Easy as π.


Got it working, thank you!
Meaner, leaner, tighter (and works with the latest firmware)...
Code:

// Cycles over entry mode options. 
 KEY K_On() 
 BEGIN 
 LOCAL an:={"Textbook","Algebraic","RPN"}; 
 Entry:=(Entry+1) MOD 3; 

 STARTVIEW(-1,1); // Refresh Home view BEFORE tagging...

 TEXTOUT_P(an(Entry+1),G0,2,207,2,RGB(255,0,0));
 FREEZE; // the mean part!
 END;
Thank you very much Cristobal, still very useful.
Bonjour
C'est une excellente idée, si je peut proposer une petite
amélioration ?
Pour les différentes langues disponibles.

Hello
It's a great idea, if I may offer a small
improvement ?
For the available languages ​​.

Code:

KEY K_On()
BEGIN
Entry:=(Entry+1) MOD 3;
STARTVIEW(-1,1);
TEXTOUT_P(STRINGFROMID(1903+Entry),G0,2,207,2,RGB(255,0,0));
FREEZE;
END;
(05-05-2016 11:11 AM)Tyann Wrote: [ -> ]
Code:

KEY K_On()
BEGIN
Entry:=(Entry+1) MOD 3;
STARTVIEW(-1,1);
TEXTOUT_P(STRINGFROMID(1903+Entry),G0,2,207,2,RGB(255,0,0));
FREEZE;
END;

Your English is fine and your code is clever!
(05-05-2016 11:11 AM)Tyann Wrote: [ -> ]Bonjour
C'est une excellente idée, si je peut proposer une petite
amélioration ?
Pour les différentes langues disponibles.

Hello
It's a great idea, if I may offer a small
improvement ?
For the available languages ​​.

Code:

KEY K_On()
BEGIN
Entry:=(Entry+1) MOD 3;
STARTVIEW(-1,1);
TEXTOUT_P(STRINGFROMID(1903+Entry),G0,2,207,2,RGB(255,0,0));
FREEZE;
END;

Great! Thanks for the improvement, I learned something new today.
Here is a popup version.
It will fill in based on the user's preferred language.

Code:

//Popup selection of Entry method
// To run: Shift:Help:On
// String in language of user

Key K_On
BEGIN
  LOCAL epick, title, entry1, entry2, entry3;
  title     := STRINGFROMID(1902); //"Choose entry method"
  entry1 := STRINGFROMID(1903); //"Textbook"
  entry2 := STRINGFROMID(1904); //"Algebraic"
  entry3 := STRINGFROMID(1905); //"RPN"
  CHOOSE(epick,title, entry1, entry2, entry3);
  Entry := epick - 1;
END;
Reference URL's