02-13-2018, 02:28 AM
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.
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?
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?