Quick navigate to Javascript Language Reference
Jsrpn calc is a programmable calculator which uses Javascript as its programming language. Assign javascript functions to buttons.
Jsrpn calc pays respect to classic HP calculators of the past by adopting a stack based, RPN (Reverse Polish Notation) mode of operation. And it has that big ENTER key too.
Call Javascript functions by pushing the parameters onto the stack and then pressing the custom button with the function name. Paramters are popped off the stack and return values (if any) are pushed onto the stack.
The stack can contain numbers, strings, arrays, objects.
Jsrpn calc has a html canvas you can draw on. Its the RPN calculator you've been waiting for your whole life. Old school meets cutting edge new school.
The flexibility of a stack based environment means you can play with values on the stack, feed one value into a javascript function and then feed its result into another javascript function. The stack becomes a playground and productive workspace, just like in the old HP days.
Edit your script but to make custom buttons appear you need to go into the "custom keys" view and check the checkboxes next to the javascript functions you want to expose as buttons.
These can take the form of custom buttons on the swipeable carousel (4 pages max), or as shifted keys on the numbers 1..9 and the / * and - operators.
Here are some tips for using Jsrpncalc.
The language you program with is plain javascript. No keystroke programming, just modern state of the art javascript. See Javascript Language Reference
Parameters to javascript functions are taken from the stack, so remember to push on the appropriate number of parameters BEFORE invoking your function. Thus if you used the Script Editor to type in the following function:
function myadd(a,b) {return a+b;}then after exposing this function as a custom button using the Custom Keys page, in order to actually use/invoke this function, you need use the main calculator interface and simply type
1 ENTER 2 myadd(where myadd is a custom button)
Your script can return values using the normal
returnkeyword. Or you can access the stack directly with the rpn object and push things on e.g.
rpn.pusher(100);
You can draw to the built in canvas.
I'm the collapsible set content for jsNumber.
I'm the collapsible set content for jsString.
I'm the collapsible set content for jsNumberString.
I'm the collapsible set content for jsBoolean.
I'm the collapsible set content for section 3.
I'm the collapsible set content for jsMath.
I'm the collapsible set content for jsArray.
I'm the collapsible set content for jsFunction.
I'm the collapsible set content for jsLogic.
I'm the collapsible set content for jsObject.
I'm the collapsible set content for jsType.
I'm the collapsible set content for jsOOP.
I'm the collapsible set content for jsError.
I'm the collapsible set content for jsLegend.