Quote Originally Posted by tabstop View Post
1. Fine.
2. More better: creates a new array of size 3 called myOperator.
3. Ditto.
4, 5, 6. Fine.
7. Index just walks through the myOperator and myOperand arrays.
8, 9. Fine.
11. This creates a new array, called ExpandedOperator, with more entries in it.
12, 13, 14, 15, 16. Fine.
17. myNumberofEntries is the size of the (smaller) arrays, whatever it happens to be (not always three). (Actually it's the number of entries that have been entered, but if we're in this section of the code it's also == the size of the array.)
Gotcha. Regarding 17, I should have mentioned that I was referring to the three I'd entered but yes, I understand now.

Quote Originally Posted by tabstop View Post
18. ++ has a higher precedence. However, it's postfix, meaning it returns the original value and therefore we use the original value for the * operator.
Ah okay. Must look over those precedences again - I completely understand what you're saying though; great explaination by the way.

Quote Originally Posted by tabstop View Post
19. Since we were using "dynamic" arrays, what we've done is deleted the short (too short, in this case) arrays. We need to move the arrays over to the old name, otherwise we would have to, in the middle of the code while the program is running, change all the names from myOperator to ExpandedOperator -- and then the next time use ExpandedExpandedOperator, and then ExpandedExpandedExpandedOperator, and so on. The point is that the current array is always known by that name, myOperator.
Thank You! This was the main part I was confused by. I was thinking myOperator was being copied over to ExpandedOperator but I keep forgetting = sets both sides, so it goes back to being called myOperator. I hope I said that right but I'm confident I get it now (feel free to correct me though if I'm wrong).

Quote Originally Posted by tabstop View Post
20. Why in the name of anything would the code decide to "run" a statement that isn't there? If it isn't there, it doesn't happen.
Figured. Stupid question on my part.

Quote Originally Posted by tabstop View Post
"21". Of course it runs again. Why wouldn't it run again? It will run every time the arrays are full. When the array has size 3, it will run when there are three elements. When the array has size 6, it will run when there are six elements. When the array has size 12, it will run when there are twelve elements.
Completely understand now. Thank you very much, tabstop. I owe you big time