Re: Phix:Sort Columns Not Working Like Expected

new topic     » goto parent     » topic index » view thread      » older message » newer message
-- original 'random' 
 
sequence 
table = { 
    {3, "cat"}, 
    {5, "chipmunk"}, 
    {5, "zebu"}, 
    {9, "geese"}, 
    {1, "dog"}, 
    $} 
 
-- first column 
? sort_columns( table, {1} ) 
 
/* 

{ 
    {1,"dog"}, 
    {3,"cat"}, 
    {5,"chipmunk"}, 
    {5,"zebu"}, 
    {9,"geese"}} 
--*/ 
 
-- second column 
? sort_columns( table, {2} ) 
 
/* 

{ {3,"cat"}, 
  {5,"chipmunk"}, 
  {1,"dog"}, 
  {9,"geese"}, 
  {5,"zebu"}} 
--*/ 
 

Looks ok, as expected for this sort of thing.

  • first column is now in sorted order
  • the "rows" just follow along unaltered

be well
_tom

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu