# Order of operations and multiplication by juxtaposition

**URL:** <https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034>\
**Category:** Factual Questions\
**Created:** [June 13, 2012, 5:24pm UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034 "2012-06-13T17:24:23Z")\
**Posts on this page:** 1\
**Page:** 2

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [June 14, 2012, 7:05am UTC](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034/21 "2012-06-14T07:05:03Z")

</div>

> [@Jragon](#):
>
> Build an expression tree\* and parse it in prefix order (i.e. the root before its left child before its right child)?
> 
> - Which I’m not going to explain how to do, but it’s not THAT hard, all things considered.

Yep, that’s how it’s done! Although the more usual terminology is:  
(a) Parse the expression – this means scanning the input text, picking it apart, and building that tree in the first place.  
(b) Walk the tree – this is the phase where you do what you described above.

[Previous page](https://boards.straightdope.com/t/order-of-operations-and-multiplication-by-juxtaposition/625034.md?page=1)
