// Example:
class cust {
char name(30)
char add_1(30)
char add_2(30)
char city(30)
char state(2)
char zip(10)
}
8.8 Number(max length, num of decimals)
8.16 Index(class, num of keys)
8.17 Table(class, cluster size)
Note: A "TABLE" property CANNOT be defined as a vector or matrix.
// Example
class myclass {
char name(30)
char add_1(30)
char add_2(30)
char city(30)
char state(2)
char zip(10)
} // record length is 132 bytes
#class xyz
#method display
table cust(myclass, 100) // this line creates a new table called cust using class myclass allocating 100 rows at a time
cust.name="David Clark" // one object of myclass is allocated for a table
=cust.append() // append the default object data to the end of the table
? cust[1,1] // displays "David Clark" Note: Records start at 1 not 0.
? cust[1].name // so would this
? cust[1] // display all data in the first row of cust
? cust.count() // would show 1 record in cust
// Note: By accessing a row or a field of a row, the data from that row is stored in the default object.
cust.name="Name 2"
=cust.append()
? cust.name // would show "Name 2"
? cust[2] // would display all data from row 2 including "Name 2"
? cust[1].name // would show "David Clark"
? cust.name // and so would this
=cust.append("David Clark,71 Whitehead Cres,,Brandon,ND,12345") // this would add this data to all the fields of record 3 in cust
// or
cust="David Clark,71 Whitehead Cres,,Brandon,ND,12345" // this would fill in the default object
=cust.append() // this would add record 3 to cust from the default data
8.18 List(class, cluster size)
8.19 Tree(class, cluster size)
8.20 Stack(class, cluster size)