Quickest way to go from "portrait" to "landscape" -
10-05-2005
, 07:08 PM
Suppose I have arrays like this:
London]John Smith]Closed]3
Sydney]Adam Jones]Open]1
Mumbai]Dipak Patel]Closed]5
Auckland]John Gray]Closed]1
....etc
and...
220]Ian Jackson]Closed]A]Joe Bloggs
221]Ian Jackson]Open]C]Scott Ball
186]Mike Kezman]Closed]B]Joe Delany
429]Ian Jackson]Closed]D]Scott Ball
....etc
and other similarly structured arrays, and I want to convert them into
a more Pick-like form:
London]Sydney]Mumbai]Auckland]...etc
John Smith]Adam Jones]Dipak Patel]John Gray]...etc
Closed]Open]Closed]Closed]...etc
3]1]5]1]...etc
Is this the best way to go about it:
PORTRAIT.LINES=DCOUNT(ARY,@AM)
DIM PORTRAIT.MAT(PORTRAIT.LINES)
MATPARSE PORTRAIT.MAT FROM PORTRAIT.LINES,@AM
LANDSCAPE.LINES=DCOUNT(PORTRAIT.MAT(1),@VM)
DIM LANDSCAPE.MAT(LANDSCAPE.LINES)
MAT LANDSCAPE.MAT=''
FOR X=1 TO PORTRAIT.LINES
FOR Y=1 TO LANDSCAPE.LINES
LANDSCAPE.MAT(Y)<1,X>=PORTRAIT.MAT(X)<1,Y>
NEXT Y
NEXT X
Mike. |