MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Sort problem


Hi,

you think that symbol1 < symbol2 is evaluated to True or False
but this is not the case and a<r is left unevaluate as symbolic
expression and can't used as an order relation.

Can you explain whar a<r should mean ?

Regards
   Jens


Donald DuBois wrote:
> Hello,
> 
> This Sort works
> 
> In[32]:= Sort[{r, a, x}]
> 
> Out[32]= {a, r, x}
> 
> but this one doesn't:
> 
> In[33]:= Sort[{{r, 2}, {a, 3}, {x, 4}}, #1[[1]] < #2[[1]] &]
> 
> Out[33]= {{r, 2}, {a, 3}, {x, 4}}
> 
> 
> What am I doing wrong?
> 
> Don
> 


  • Prev by Date: Re: About the warning or error message
  • Next by Date: Re: Sort problem
  • Previous by thread: Re: Sort problem
  • Next by thread: Re: Sort problem