Polish_notation Polish_notation

Polish notation - Definition and Overview

Related Words: Accent, Addition, Alphabet, Annotation, Approximation, Arrangement, Art, Bar, Bit, Blueprint, Cancel, Character, Characterization, Characters, Chart, Choreography, Cipher, Code, Comment, Commentary

Polish notation, also known as prefix notation was created by Jan Łukasiewicz. Operators are placed before operands.

+ 1 2

Yields (as expected) 3.

It is not limited to only two values, nor to just addition.

(* (+ 0 1) (+ 2 3)) 

Returns 5.

While the examples above use parantheses, one of the benefits of Polish notation is that, assuming the arity of each operator is known, parentheses are unnecessary: the order of operations is unique and easy to determine, if the expression is known to be correct. For example, assuming * and + are binary,

* + 0 1 + 2 3

can refer only to

(* (+ 0 1) (+ 2 3))

Polish notation is used in computer programming languages Lisp, Scheme (based on Lisp), and some others.

See also

Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.