The following example shows how to convert a position in the presentation space represented as a linear array to a position shown in row and column coordinates.

// ECLPS::ConvertPosToRowCol
// Find a string in the presentation space and display the row/column
// coordinate of its location.
void Sample67() {
ECLPS PS('A');            // PS Object
ULONG FoundPos;           // Linear position
ULONG FoundRow,FoundCol;
FoundPos = PS.SearchText("HCL", TRUE);
if (FoundPos != 0) {
  PS.ConvertPosToRowCol(FoundPos, &FoundRow, &FoundCol);
  // Another way to do the same thing:
  FoundRow = PS.ConvertPosToRow(FoundPos);
  FoundCol = PS.ConvertPosToCol(FoundPos);
  printf("String found at row %lu column %lu (position %lu)\n",
         FoundRow, FoundCol, FoundPos);
else printf("String not found.\n");
} // end sample