Example 1: User type with a record structure
The example shows how to define a user type as a RECORD
.
TYPE t_customer RECORD
cust_num INTEGER,
cust_name VARCHAR(50),
cust_addr VARCHAR(200)
END RECORD
MAIN
DEFINE custrec t_customer
DEFINE custarr DYNAMIC ARRAY OF t_customer
LET custrec.cust_num = 123
LET custrec.cust_name = "Mike Pantock"
LET custarr[10].* = custrec.*
END MAIN