Post Reply 
HP50g R/S key
06-30-2019, 04:43 PM
Post: #12
RE: HP50g R/S key
(06-30-2019 02:56 PM)Neve Wrote:  ...Like in this simple HP41 program.

Bruce responded with the "INPUT" suggestion before I could finish my post Smile. Here's a sample of how that might look:
Code:
«
   "HITS?" "" INPUT STR→
   "WALKS?" "" INPUT STR→
   "HIT-PITCH?" "" INPUT STR→
   "AT BAT?" "" INPUT STR→
   "SAC FLY?" "" INPUT STR→
   → hits walks hitpitch atbat sacfly
   «
      hits
      walks
      +
      hitpitch
      +
      ...
   »
»

Entering the values is a simple matter of pressing the numeric keys needed followed by ENTER, after which the program automatically continues (no need for CONT). The values left on the stack by that series of INPUT steps are then stored in local variables which are then accessible by name in the subsequent « ... » block.

I believe this type of construct provides similar functionality to the 41 code you listed. Instead of pressing R/S after entering the values, you simply press ENTER. The INPUT command has more overhead than PROMPT, but that's needed to support the different object types and to allow for additional processing if needed based on the contents of what was entered.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP50g R/S key - Neve - 06-30-2019, 01:31 PM
RE: HP50g R/S key - grsbanks - 06-30-2019, 01:50 PM
RE: HP50g R/S key - Neve - 06-30-2019, 01:58 PM
RE: HP50g R/S key - Neve - 06-30-2019, 02:01 PM
RE: HP50g R/S key - grsbanks - 06-30-2019, 02:15 PM
RE: HP50g R/S key - Neve - 06-30-2019, 02:33 PM
RE: HP50g R/S key - grsbanks - 06-30-2019, 02:41 PM
RE: HP50g R/S key - Neve - 06-30-2019, 02:56 PM
RE: HP50g R/S key - BruceH - 06-30-2019, 04:11 PM
RE: HP50g R/S key - Neve - 06-30-2019, 04:13 PM
RE: HP50g R/S key - DavidM - 06-30-2019 04:43 PM
RE: HP50g R/S key - Neve - 06-30-2019, 05:33 PM
RE: HP50g R/S key - grsbanks - 06-30-2019, 03:05 PM



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