Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: SecondAmendment

It is easy. It all depends where you put the operator.

Prefix +, 2, 2
Infix 2, +, 2
Postfix 2, 2, +

People like Infix because it is the way they were taught arithmetic. Two PLUS Two EQUALS Four.

But Postfix works best on calculators and computers. You just need to master the idea of a “Stack” and pushing numbers onto the stack and popping them off the stack.

Clear now?


45 posted on 10/05/2022 5:59:08 PM PDT by ProtectOurFreedom (“I used to be nothing but a Deplorable Clinger, but I've been promoted to Brigadier Ultra-MAGA”)
[ Post Reply | Private Reply | To 24 | View Replies ]


To: ProtectOurFreedom

Packing the stack make repetitive operations (like in an equation) much faster.


83 posted on 10/05/2022 7:18:36 PM PDT by doorgunner69 (Let's go Brandon)
[ Post Reply | Private Reply | To 45 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson