Please take a look at the following code:
Sort[{1, y, x}, Greater]
Max[{1, x, y}]
x = 1
y = 2
Sort[{1, y, x}, Greater]
Max[{1, x, y}]
It is interesting to note that the first Sort always produce a definite result while the first Max does not, even when Greater is specified. Note I have not given any numerical values for x and y. Why is this and how can I have a Sort function behave the same way as the Max (or Min) function?
Thanks!