Re: Phix:Sort Columns Not Working Like Expected
- Posted by euphoric (admin) Jun 24, 2020
- 1836 views
petelomax said...
I should strongly recommend going the columnize() route, defining 5 and 'A' next to each other to start with, as per the pp(ic) outputs. Inserting/deleting the 3rd element of 54321 and ABCDE looks simple enough, but once they're 50+ elements long it gets to be a RPITA keeping two or more such sequences perfectly in step. Note that when I say "columnize() route", you should understand there is a reversibility about that:
sequence ic = columnize({{5,4,3,2,1},{'A','B','C','D','E'}}) ppOpt({pp_IntCh,-1}) pp(ic) -- {{5,'A'}, {4,'B'}, {3,'C'}, {2,'D'}, {1,'E'}} pp(columnize(ic)) -- {{5,4,3,2,1}, {'A','B','C','D','E'}}
Thanks, Pete! I think columnize() will work fine.