next up previous contents FITSIO Home
Next: 10.11.5 Good Time Interval Up: 10.11 Row Filtering Specification Previous: 10.11.3 Vector Columns

10.11.4 Row Access

To access a table entry in a row other than the current one, follow the column's name with a row offset within curly braces. For example, PHA{-3} will evaluate to the value of column PHA, 3 rows above the row currently being processed. One cannot specify an absolute row number, only a relative offset. Rows that fall outside the table will be treated as undefined, or NULLs.

Using the same column name on the left and right side of the equals sign while using the COLUMN{-N} notation will not produce the desired result. For example,

              COUNT = COUNT{-1} + 1;   # BAD - do not use
will not produce an increasing counter. Such recursive calculations are often not possible with the calculator syntax.