Post Reply 
HP42S commands with symbols renaming advice
02-13-2018, 06:13 AM
Post: #3
RE: HP42S commands with symbols renaming advice
(02-13-2018 02:28 AM)tcab Wrote:  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?

Good idea, would you give us the link to the repo?
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 - cappy2112 - 02-13-2018 06:13 AM



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