This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sorting


Hi -

weikong wrote:

> Some time what I want to sort is not the value, but some key. 
> How? can?  

Yes.  As the man page points out, you can put the "+" or "-" sorting
directive on an index in the foreach loop:

          foreach ([a,b-] in arr) { }

Then the iteration will be in decreasing order of the second key.

- FChE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]