We can also write or refer to a field as a variable like as below code.
public void printCust()
{
int i, n, k;
CustTable custTable;
DictTable dictTable;
;
dictTable = new DictTable(custTable.TableId);
n = dictTable.fieldCnt();
print "Number of fields in table: ", n;
for(i=1; i<=n; i++)
{
k = dictTable.fieldCnt2Id(i);
print "The ", dictTable.fieldName(k),
" field with Id=",k, " contains '",
custTable.(k), "'";
pause;
}
}
No comments:
Post a Comment