User Equation Library Follow-up questions
I see a series of 3 threads from 1997 / 1998:
“New Equations” started by Eric Jonas Jan 28 1997,
http://groups.google.com/group/comp.sys.hp48/browse_thread/thread/16918f9e26a9e136/7b36bc5870f5c8a6?lnk=gst&q=user+rpl+equation+library#7b36bc5870f5c8a6
“User Equation Library in User-RPL” started by John Meyers Mar 8 1998
http://groups.google.com/group/comp.sys.hp48/browse_thread/thread/e01e4adb8fe16d6c/1a32e6089dc5488c?lnk=gst&q=user+rpl+equation+library#1a32e6089dc5488c
“User Equation Library in User-RPL” started by John Meyers May 29
1998,
http://groups.google.com/group/comp.sys.hp48/browse_thread/thread/f8665d75a07eef57/47e6edb56df74ee7?lnk=gst&q=user+rpl+equation+library#47e6edb56df74ee7
Time warp – more than 15 years since the first thread, it still looks
very useful to me. Of course I need to add my own equations. Also
it looks like a good opportunity to brush up on user-RPL....
interfacing with the program as a user and then inspecting the RPL
code behind it.
QUESTIONS:
1 – Forum etiquette question for future reference - Should I have
posted followup questions onto the decade+ old thread or is it more
appropriate to generate a new thread as I did here?
2 – I’d like to clarify the example directory/equation structure
posted in the last thread. Is this:
2A – Just example directory structure which cannot be auto-loaded into
memory in it’s present form
2B – User RPL that can somehow be automatically loaded to create the
directory structures.
Answer 2A doesn’t make sense because there are intermingled comment
sign @ as if it was code. Also at the end a stop command “Stop { } @
Stops menu listing in this directory (even without hider). “ which
makes no sense to me if this is just an example.
Answer 2B doens’t work because the code doesn’t run and doesn’t match
syntax for any DIR command.
Obviously I am missing some part of the picture. Can you lessen my
confusion?
I would like to build my equation set on PC and keep the master
version on PC. So I envision it would be helpful to have a
programmatic way to load the directory structure with equations. For
readability of original code it makes sense to have name before
definition. So I created SSTO swap/sto command to store variables when
name entered before variable. The way I envision to store my
equations on PC for programmatic loading is as follows:
Below is the format that I'm thinking about building my libraries.
Feel free to comment if it appears I'm wandering off in a meaningless
direction:
=========CODE CUT/PASTED FROM HPUSEREDIT===========
« @ PROGRAM TO LOAD DIRECTORY STRUCTURE AND EQUATIONS PROGRAMMATICALLY
@ Create subroutine SSTO (in home) which swaps and stores
HOME « SWAP STO » 'SSTO' STO
@ Create dir EQLIB as subdir to home
HOME @ Navigate to home
'EQLIB' CRDIR
@ Create dir Sample1 as subdirctory to EQLIB
EQLIB @ navigate to directory EQLIB
'Sample1' CRDIR
@ Create entries
Sample1 @ navigate to directory Sample1
@ Note - we don't need single quotes around var names since they don't
already exist
Trip 'Dist=Rate*Time' SSTO @ Uses standard solver
Lamp { 'V=I*R' 'W=V^2/R' } SSTO @ Uses Multiple-Equation solver
Prog « P Q * 1 - » SSTO @ Programs may be used as equations
@ Optional units for Trip:
TripINIT { 0_mi Dist 0_mph Rate 0_h Time } SSTO @ Value VarName ...
@ Optional units for Lamp:
LampINIT { 0_V V 0_W W 0_A I 0_\GW R } SSTO @ Special char. for Ohms
@ Optional variable descriptions for Lamp:
LampVARS { "V: Voltage" "W: Wattage" "I: Current" "R: Resistance" }
SSTO
@ Optional Multi-equation title and menu labels:
LampMITM { "Lamp" { V W "" I R } } SSTO
@ Clean up (remove) SSTO
HOME 'SSTO' PURGE »
============ END OF CODE========================