# Significance of a negative value for a row or column

In the String descriptor and in several other descriptors and actions,
a negative value for a row or column indicates an offset from the
last row or the last column of the host terminal. The macro runtime
calculates the row or column location as follows:

```
actual row = (number of rows in text area) + 1 + (negative row offset)
actual column = (number of columns in text area) + 1 + (negative column offset)
```

For
example, if the host screen has 24 rows of text then a row coordinate
of -1 indicates an actual row coordinate of 24 (calculated as: 24
+ 1 - 1). Similarly if the host screen has 80 columns of text then
a column coordinate of -1 indicates an actual column coordinate of
80 (calculated as 80 + 1 - 1).The row calculation above ignores the OIA row. For example, if the host screen has 25 rows, it has only 24 rows of text.

The advantage of this convention is that if you want to specify a rectangle at the bottom of the host terminal, then this calculation gives the right result whether the host screen has 25, 43, or 50 rows. Similarly, if you want to specify a rectangle at the right side of the host terminal, then this calculation gives the right result whether the host screen has 80 columns or 132 columns.

Table 1 and Table 2 show the results for a few calculations:

Negative value for row: | Actual value in host terminal with 24 rows of text (OIA row is ignored): | Actual value in host terminal with 42 rows of text (OIA row is ignored): | Actual value in host terminal with 49 rows of text (OIA row is ignored): |

-1 | 24 | 42 | 49 |

-2 | 23 | 41 | 48 |

-3 | 22 | 40 | 47 |

Negative value for column: | Actual value in host terminal with 80 columns: | Actual value in host terminal with 132 columns: |
---|---|---|

-1 | 80 | 132 |

-2 | 79 | 131 |

-3 | 78 | 130 |

Whether you use this convention or not, you should at least remember that a rectangular area with coordinates of (1,1) and (-1,-1) means the entire text area of the host terminal.