File: gsort.sl

package info (click to toggle)
slrn 1.0.3%2Bdfsg-3
  • links: PTS
  • area: main
  • in suites: buster
  • size: 6,412 kB
  • sloc: ansic: 39,852; sh: 3,777; perl: 467; makefile: 229; sed: 24
file content (16 lines) | stat: -rw-r--r-- 532 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
% This macro sorts your group list ASCIIbetically.
% 
% It is kept simple to serve as a demonstration of the get_group_order /
% set_group_order intrinsic functions.  For more features, use a macro like
% group_sort.sl by J.B. Nicholson-Owens <http://forestfield.org/slrn/>
% 
% Note: You need at least S-Lang version 1.4.0 for this to work.

public define sort_groups ()
{
   variable group_order;
   
   group_order = get_group_order ();
   group_order = group_order[array_sort (group_order)];
   set_group_order (group_order);
}