|  | 
 | ||||
|        | |||||
|  | ||||||
| Related Syntax | Other Library Functions | |||||
| function | UTIL_SortStreamsByKey | 
| Library: Utilities (OMUTIL) legacy library Include: omutil.xin | 
define function UTIL_SortStreamsByKey modifiable stream stream-shelf
Argument definitions
Use UTIL_SortStreamsByKey to sort a shelf of streams by their keys in ascending order.
You must include the following line at the beginning of your OmniMark program:
include "omutil.xin"
stream-shelf must
You may want to write a function to build your stream shelf from your existing data.
  include "omutil.xin"
  process
     local stream my-stream variable initial {"foo" with key "a", 
                                              "bar" with key "c",
                                              "sna" with key "b",
                                              "try" with key ""}
     UTIL_SortStreamsByKey my-stream
     
     repeat over my-stream
       output "key " 
          || key of my-stream
          || "; item " 
          || my-stream
          || "%n"
     again
Copyright © Stilo International plc, 1988-2008.