writef()
Oskar Linde
oskar.lindeREM at OVEgmail.com
Thu Feb 23 23:11:15 PST 2006
nascent wrote:
> I created a stack using a LinkedList. This worked, but when testing it I
> found using,
>
> writef("%s, %s, %s", stack.pop(), stack.pop(), stack.pop());
>
> would present the stack as a fifo. I assume the results are because it
> is evaluating the arguments from right to left. Why?
The order of evaluation is undefined. In this case, the ABI of your
architecture says function arguments are pushed on the stack from the
right to left. Therefore, it is also convenient for the compiler to
evaluate them in that order.
/Oskar
More information about the Digitalmars-d-learn
mailing list