Post Reply 
HP42S commands with symbols renaming advice
02-13-2018, 11:21 AM
Post: #6
RE: HP42S commands with symbols renaming advice
(02-13-2018 09:07 AM)Vincent Weber Wrote:  But I wonder if Python could help ! Do you support something like equation parsing that would be translated into RPN ?

Hey Vincent. Equation parsing sounds pretty ambitious - certainly a higher level language like Python will multiply your chances significantly. My Python to RPN converter doesn't have any specific parsing or token related functionality like e.g. the tokenize module. It is simply core Python syntax (which is very powerful), but no built in Python libraries that you would get in desktop Python. You have to rely on the ability to call HP42S commands from Python to do your work. Specifically, it has the following capabilities:
  1. Variables
  2. Functions, Multiple functions, nested functions
  3. Parameter passing, receiving return values, multiple return values
  4. if elif else
  5. Comparison operators == != > < >= <=
  6. Booleans True, False and operators not or and
  7. for loops, range(), for..in iteration through lists and dictionary keys
  8. while loops, while...else
  9. continue and break operations in for loops and while loops
  10. Lists and Dictionaries (basic operations only).
  11. Matrices, Pythonic matrix element access syntax [row,col]
  12. NumPy compatible slicing syntax for sub-matrices
  13. Complex numbers using either 42S or Python native syntax
  14. Expressions involving nested brackets
  15. assert
  16. Testing and clearing of flags
  17. Access most HP42S commands as function calls e.g. FIX(2)
  18. Some enhanced functions to make like easier e.g. varmenu() automates and simplifies the generation of MVAR based code.

You write in Python, hit a button and RPN is generated. Paste the RPN into Free42 or transfer it to your DM42 - and it runs.
I've sent you a PM with the beta site url. If anybody else is interested, feel free to PM me.

cheers,
Andy
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: HP42S commands with symbols renaming advice - tcab - 02-13-2018 11:21 AM



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