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
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.

Under construction. Email me your wish list for improvements.