mikaelpatel / Arduino-Shell

RPN Postscript/Forth Command Shell for Arduino
19 stars 5 forks source link

Info: Case statement #23

Closed dpharris closed 8 years ago

dpharris commented 8 years ago

I found a nice case statement form:

c {+-*+*+}\1- {uX u'+={(add )}i u'-={(minus )}i '*={(times )}i 1+}l

This outputs: "add minus times add times add"

I added a X trap that pops a char onto the stack from the {} list.