Post Reply 
User defined touch-button menu (Softkeys)
06-23-2019, 12:14 PM
Post: #11
RE: User defined touch-button menu (Softkeys)
(06-23-2019 12:03 PM)Stevetuc Wrote:  
(06-23-2019 05:10 AM)Gene222 Wrote:  I can't get this program to work properly in RPN mode. Currently, using the program in the previous post (in RPN mode), to take the sin of 45 degrees you have to press: 45 [Enter] [Vars] SIN [Enter]. This key sequence puts 45 in the first stack register. The program then takes the 45 and changes it to 0.7071.

I tried to program the first [Enter] using RETURN(30); as shown in the program below. The program puts 45 in the first stack register, but then stops execution, which is what one would expect from the RETURN command. I don't know how to make the program continue execution.

RPN code that does not work
PHP Code:
KEY K_Vars()
BEGIN
  LOCAL ch_num
,ch_items,func_list;
  
// choose items
  
ch_items:={"SIN","ASIN","COSH","ACOSH"};
  
// function list
  
func_list:={"SIN()","ASIN()","COSH()","ACOSH()"};
  RETURN(
30);
  
CHOOSE(ch_num,"Functions Menu",ch_items);
  RETURN(
func_list(ch_num));
END

If you remove the RETURN(30) then for your example
press: 45[Vars] SIN [Enter].
45sin() will appear on command line and then the result on pressing the [Enter] key
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: User defined touch-button menu (Softkeys) - Stevetuc - 06-23-2019 12:14 PM



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