From: Len Fellman <lfellman@a.crl.com>
Newsgroups: comp.sys.hp48
Subject: Old baby Casio better than HP48?
Date: Sun, 16 Aug 1998 23:28:20 -0700
Organization: College of Alameda
Lines: 68
Message-ID: <35D7CD84.C1CFFE9A@a.crl.com>
Reply-To: lfellman@a.crl.com
NNTP-Posting-Host: a103011.sfo3.as.crl.com
Mime-Version: 1.0
X-Mailer: Mozilla 4.05 [en] (Win95; U)
Xref: republic.btigate.com comp.sys.hp48:14672


  A few years ago it struck me that the old, simple Casio calculators could do
  something that the HP48 couldn't do: they called it Constant Factor, and you
  could set up a factor (or dividend, summand, or minuend) to applied repeatedly
  E.g. you could hit 5.379 X X   and then every subsequent entry would be
  multiplied by 5.379.
        But the nice thing about the 48 is that you can program it to do almost
  anything.  I wrote the following program to supply not only the Constant
  Factor feature, but any program taking one argument (or more: see below) to
  applied to an entered number:

@ KF
%%HP: T(3)A(R)F(.);
@ Vectored Enter program: prompts for program to be applied whenever ENTER
@ is pressed.  Process terminated by entering SPC.  (I.e. SPC  ENTER)
@ Existing user key assignments are suspended during process.   
@ Enter program without << >> or " ".   Two-argument programs can be used
@ provided the args. are separated by SPC rather than by ENTER:  E.g.
@ program:  SQ SWAP SQ + SQRT    Entry:  5 SPC 12   Result: 13 (=sqrt(SQ5+SQ12))
\<< 0 RCLF "" \-> k
flags pgm
  \<< RCLKEYS 'keyS'
STO 0 DELKEYS { -62
-63 } SF "Program?"
"" INPUT 'pgm' STO
    \<<
      IF DUP " "
SAME
      THEN CONT
      ELSE OBJ\->
      END
    \>> '\GaENTER' STO
    \<<
      IF "DUP" SAME
      THEN DROP
      END
      IFERR pgm
OBJ\->
      THEN ERRM 1
DISP "" 2 DISP 1
FREEZE 1 WAIT
      END CONT
    \>> '\GbENTER' STO
    DO pgm 1 DISP
"     Enter SPC to kill"
2 DISP 1 FREEZE
HALT
    UNTIL DUP " "
SAME
    END DROP keyS
STOKEYS flags STOF
{ \GaENTER \GbENTER
keyS } PURGE
  \>>
\>>
