Questions tagged [postfix]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
70 views

LDAP with Dovecot

I have a mail server setup with Postfix and Dovecot, and an application server setup with node.js. I have user credentials stored in my application server, and I want to use the same credentials for ...
1
vote
1answer
439 views

How do I interpret this postfix right-to-left algorithm?

I'm trying to implement this right-to-left evaluation algorithm of a postfix expression but I can't seem to get it to work. for each token in the reversed postfix expression: if token is an ...
3
votes
1answer
388 views

Is it worth parsing an infix algebraic expression to postfix and then an expression tree?

I am trying to make a simple expression parser, in which users type an expression in infix notation (for example ln((1+2)(3-4))) to apply some calculations. To make this possible I need to tokenize ...
4
votes
2answers
1k views

Postfix vs Prefix

I have read at a few places, that Postfix is easier to evaluate & easier to convert to Code than Prefix. I understand that if you parse a prefix expression from left to right, you might not be ...
4
votes
2answers
388 views

Variable assignment in a postfix language

TL;DR is val name <- more readable than name val <-? I'm designing a semi-concatenative, postfix language. I haven't given much thought to the style in which variable are assigned, and now I ...
2
votes
2answers
12k views

why use postfix /prefix expression instead of infix?

I understand how to convert infix to postfix/prefix but I do not understand why postfix or prefix expression are used in computer system? What is the advantage of postfix prefix over infix expression?...
0
votes
5answers
4k views

Algorithm for recursive evaluation of postfix expressions

I'm reading Sedgewick's book on algorithms in C and I'm looking for an algorithm to evaluate postfix expressions (addition and multiplication only) without using a stack. I tried to implement one but ...
3
votes
8answers
3k views

Are there real world applications where the use of prefix versus postfix operators matters?

In college it is taught how you can do math problems which use the ++ or -- operators on some variable referenced in the equation such that the result of the equation would yield different results if ...
26
votes
11answers
31k views

Avoid Postfix Increment Operator

I've read that I should avoid the postfix increment operator because of performance reasons (in certain cases). But doesn't this affect code readability? In my opinion: for(int i = 0; i < 42; i++)...
55
votes
15answers
5k views

Why do we have postfix increment?

Disclaimer: I know perfectly well the semantics of prefix and postfix increment. So please don't explain to me how they work. Reading questions on stack overflow, I cannot help but notice that ...