Tedd OKANO / Mbed 2 deprecated RPN_calc__based_on_K_and_R

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
okano
Date:
Sat Jun 27 01:29:21 2015 +0000
Parent:
4:b4c8aee2ecad
Commit message:
functions "power" and "drop" are added

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Jun 27 01:21:34 2015 +0000
+++ b/main.cpp	Sat Jun 27 01:29:21 2015 +0000
@@ -37,6 +37,13 @@
                     stack_dump  = 0;
                 }
                 break;
+            case 'p':
+                op2 = pop();
+                push( pow( pop(), op2 ) );
+                break;
+            case 'd':
+                pop();
+                break;
             case '\n':
                 break;
             case 0x0D: