Brian Dunning's FileMaker Custom Functions

RPN ( expression )

Evaluate an expression with Reverse Polish Notation

  Average rating: 4.5 (32 votes) Log in to vote

Stephen Dolenski   Stephen Dolenski - Show more from this author
Ocean West Inc.
http://fmforums.com

Share on Facebook Share on Twitter

  Sample input:
10 25 2 * + 40 +
  Sample output:
100

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This CF will allow you to evaluate an expression with Rerverse Polish Notation. Where entry detrmines order of operation, using a stack to push and pull from.

RPN input would be written : 10 25 2 * + 40 +
Infix input would be written : ((25 * 2) + 10) + 40

see also http://en.wikipedia.org/wiki/Reverse_polish

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Support this website.

This library has been a free commmunity resource for FileMaker users and developers for 15 years. It receives no funding and has no advertisements. If it has helped you out, I'd really appreciate it if you could contribute whatever you think it's worth: