Example
The following example shows how to return the position in the presentation space of the first character of the field.
/-------------------------------------------------------------------
// ECLField::GetStart
//
// Iterate over list of fields and print each field
// starting pos, row, col, and ending pos, row, col.
//-------------------------------------------------------------------
void Sample34() {
ECLPS *pPS; // Pointer to PS object
ECLFieldList *pFieldList; // Pointer to field list object
ECLField *pField; // Pointer to field object
try {
pPS = new ECLPS('A'); // Create PS object for 'A'
pFieldList = pPS->GetFieldList(); // Get pointer to field list
pFieldList->Refresh(); // Build the field list
printf("Start(Pos,Row,Col) End(Pos,Row,Col) Length(Len)\n");
for (pField = pFieldList->GetFirstField(); // First field
pField != NULL; // While more
pField = pFieldList->GetNextField(pField)) { // Next field
printf("Start(%04lu,%04lu,%04lu) End(%04lu,%03lu,%04lu)
Length(%04lu)\n",
pField->GetStart(), pField->GetStartRow(),
pField->GetStartCol(),
pField->GetEnd(), pField->GetEndRow(),
pField->GetEndCol(), pField->GetLength());
}
delete pPS;
}
catch (ECLErr Err) {
printf("ECL Error: %s\n", Err.GetMsgText());
}
} // end sample