I another language I used you can define what they call a StringTemplate, for accessing and working with data
Something like this:
DIM MYTPL:"CustId:C(6),Name:C(20),Addr1:C(30),City:C(14),Phone:N(20),Balance[2]:N(10)"
Then you can populate the fields:
MYTPL.CustId = "Fred"
MYTPL.Balance =100
MYTPL.Balance[1] = 20
MYTPL.Balance[2] = 120
or retrieve them
DIM A as string
A = MYTPL.CustId
Or you can do:
DIM A as string
A = "CustId"
FIELD MYTPL,A = "Fred"
OR
localcustid = FIELD(MYTPL,A)
DIM A as string
A= FATTR(MYTPL)
give you back the template definition
Lots more stuff, but it makes it very easy to pass data around as well as save and retrieve it
Something like this:
DIM MYTPL:"CustId:C(6),Name:C(20),Addr1:C(30),City:C(14),Phone:N(20),Balance[2]:N(10)"
Then you can populate the fields:
MYTPL.CustId = "Fred"
MYTPL.Balance =100
MYTPL.Balance[1] = 20
MYTPL.Balance[2] = 120
or retrieve them
DIM A as string
A = MYTPL.CustId
Or you can do:
DIM A as string
A = "CustId"
FIELD MYTPL,A = "Fred"
OR
localcustid = FIELD(MYTPL,A)
DIM A as string
A= FATTR(MYTPL)
give you back the template definition
Lots more stuff, but it makes it very easy to pass data around as well as save and retrieve it