Program to change entry mode on Prime
#1

This program allows the entry mode to be changed from any screen without the need to enter the Home settings screen.

EXPORT Entry_Mode()
BEGIN
CHOOSE(N,"Entry_Mode","Textbook","Algebraic","RPN");
CASE
IF N==1 THEN
Entry:=0;
END;
IF N==2 THEN
Entry:=1;
END;
IF N==3 THEN
Entry:=2;
END;
DEFAULT
END;
END;

Edited: 27 Oct 2013, 11:13 a.m.

#2

Hi Friend,

Nice PRG. but:

IF CHOOSE(...)

THEN

Entry:=N-1;

END;

Same, short salute ;)

jose

#3

Actually, It's simpler than that:

BEGIN 
CHOOSE (...);
Entry:=N-1;
END;

Using IF..THEN is unnecessary and results in a syntax error.

#4

Quote:
Actually, It's simpler than that:

BEGIN 
CHOOSE (...);
Entry:=N-1;
END;

Using IF..THEN is unnecessary and results in a syntax error.


Your code actually produces an error if the user "cancels" the menu (presses [On] or [Esc]) because N would default to 0 and make Entry be equal to -1.

When using CHOOSE() inside IF THEN END, do not include the ";" at the end of CHOOSE() because it "ends" the block prematurely. This causes the syntax error. Instead, type

IF CHOOSE(...)  // no semi-colon like Joseph Ec originally suggested
THEN
Entry:=N-1;
END;


Edited: 28 Oct 2013, 10:14 a.m.



Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending little images to the Prime (...and Program name bug?) Erwin Ried 19 7,177 12-10-2013, 05:35 PM
Last Post: Erwin Ried
  Problem with debug HP prime program, somebody help me? Carlos CM (Mexico) 6 3,262 12-05-2013, 03:07 PM
Last Post: Carlos CM (Mexico)
  Integration question and "RPN" mode comment Craig Thomas 16 5,731 12-05-2013, 02:32 AM
Last Post: Nick_S
  HP Prime: adding an entry to a vector Alberto Candel 12 3,944 12-02-2013, 01:18 PM
Last Post: Alberto Candel
  HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 1,173 11-25-2013, 11:35 AM
Last Post: Joseph Ec
  Prime: Placing more than 1 item on the RPN stack in a single program? John Colvin 4 2,207 11-19-2013, 08:59 AM
Last Post: Miguel Toro
  Prime: Program size limited to 64K? Erwin Ried 4 1,987 11-17-2013, 11:42 PM
Last Post: Joseph Ec
  Complex Number Entry on Prime Jeff O. 19 5,034 11-16-2013, 12:34 PM
Last Post: Jeff O.
  [HP-Prime] Picking elements from a List in a program Jean-Michel 3 1,946 11-15-2013, 04:16 AM
Last Post: dg1969
  HP Prime: Recommendation for future RPN Program Mode BruceTTT 3 2,109 11-13-2013, 10:03 PM
Last Post: BruceTTT

Forum Jump: