The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
Prime: Key Assignment
01-11-2014, 05:22 PM
Post: #1
Prime: Key Assignment
Hi,

Having read the manual (p 516/517) I was under the impression that all key assignments would do was to return a function or other text using the RETURN command. I played around using this command, but found it very difficult to make any key assignments of much use. Then when reading another message on the forum I was directed to an article on the comp.sys.hp48 where a person called Toby had made a short key assignment to scroll through Textbook, Algebra and RPN input settings.

To my surprise his method did not rely on the RETURN command at all, and still worked fine. As I have not found this being discussed elsewhere on the forum, I thought it worthwhile to mention, also that you can have several key assignments in one program file.

Below is an example key assignment file, that allows toggling between RPN and Textbook (I have not had occasion to use the Algebra setting at all so far) and also between Radians and Degrees, both in Home view.

I have kept the code in a file called User Keys

Code:

// Toggle switch RPN/Textbook
KEY K_On()
BEGIN
 IF Entry == 0  
  THEN Entry:=2 
  ELSE Entry:=0;
 END;
//Trick to refresh screen
STARTVIEW(−8,1);
STARTVIEW(−1,1); 
END;

// Toggle switch Deg/Radians in Home view
KEY K_Eex()
BEGIN
 IF HAngle == 0  
  THEN HAngle:=1 
  ELSE HAngle:=0;
 END;
//Trick to refresh screen
STARTVIEW(−8,1);
STARTVIEW(−1,1);
END;

Cheers, Terje
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Prime: Key Assignment - Terje Vallestad - 01-11-2014 05:22 PM
RE: Prime: Key Assignment - The Shadow - 01-11-2014, 09:02 PM
RE: Prime: Key Assignment - Han - 01-11-2014, 10:38 PM
RE: Prime: Key Assignment - Miguel Toro - 01-13-2014, 05:19 PM
RE: Prime: Key Assignment - Han - 01-13-2014, 07:03 PM
RE: Prime: Key Assignment - Mario Blasone - 12-14-2023, 11:05 AM
RE: Prime: Key Assignment - Tyann - 12-14-2023, 05:12 PM
RE: Prime: Key Assignment - Miguel Toro - 01-13-2014, 10:47 PM
RE: Prime: Key Assignment - gehakte_bits - 12-14-2023, 08:16 PM



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