Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
changing 2D arrays to lpstr
#2
Macro Macro1534
Code:
Copy      Help
;create 2D array for testing
ARRAY(str) a.create(2 3)
a[0 0]="A"
a[1 0]="B"
a[0 1]="C"
a[1 1]="D"
a[0 2]="E"
a[1 2]="F"

;-------------

;create ICsv variable from the array
ICsv c=CreateCsv(1)
int i nc(a.len(1))
for(i 0 a.len) c.AddRowSA(i nc &a[0 i])

;ICsv -> grid control
c.ToQmGrid(id(1532 "Options")) ;;grid in QM Options dialog, Tools tab
;or
;DlgGrid g.Init(id(1532 "Options")); g.FromICsv(c)

;-------------

;if you need string
str s
c.ToString(s)
out s


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)