Post Reply 
HP42S commands with symbols renaming advice
02-13-2018, 02:28 AM (This post was last modified: 02-13-2018 02:41 AM by tcab.)
Post: #1
HP42S commands with symbols renaming advice
I have built a Python to RPN converter, a web based tool which lets you program the HP42S/Free42/DM42 using the Python language. You type in Python and the converter outputs a complete RPN program that you can paste into Free42.

HP42S commands which include symbols like ?!,.<>+-×÷≤≠↑Σ→ etc. are not valid Python syntax, so alternative names have been invented. Something like FS? is exposed as e.g. isFS(). The table below lists all renamed commands.

Code:

    '%':        'Percent',
    '%CH':      'PercentCH',
    '1/X':      'Reciprocal',
    '10↑X':     'CommonExp',
    'ALLΣ':     'ALLStat',
    'BASE+':    'BASEplus',
    'BASE+/–':  'BASEplusMinus',
    'BASEx':    'BASEtimes',
    'BASE÷':    'BASEdivide',
    'BASE–':    'BASEminus',
    'E↑X':      'Eto',
    'E↑X-1':    'EtoMinus1',
    'HMS+':     'HMSplus',
    'HMS–':     'HMSminus',
    'LINΣ':     'LINStat',
    'LN1+X':    'LN1plus',
    'N!':       'Factorial',
    'RDX,':     'RDXcomma',
    'RDX.':     'RDXperiod',
    'Σ+':       'StatPlus',
    'Σ-':       'StatMinus',
    'ΣREG':     'StatREG',
    'ΣREG?':    'StatWhichREG',
    '→DEC':     'toDEC',
    '→DEG':     'toDEG',
    '→HMS':     'toHMS',
    '→HR':      'toHR',
    '→OCT':     'toOCT',
    '→POL':     'toPOL',
    '→RAD':     'toRAD',
    '→REC':     'toREC',
    'FS?':      'isFS',
    'FC?':      'isFC',
    'REAL?':    'isREAL',
    'BIT?':     'testBIT',
    'CPX?':     'isCPX',
    'MAT?':     'isMAT',
    'STR?':     'isSTR',

I am looking for community input on the replacement function names that I have chosen. I have tried to keep the core HP42S name in uppercase, and describe the symbol where possible. I'm toying with the idea of making each function start with an uppercase letter - or does what I have chosen look ok?
Find all posts by this user
Quote this message in a reply
Post Reply 


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



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