### astColumnNull

Get or set the null value for an integer column of a FITS table

#### Description:

This function allows a null value to be stored with a named integer-valued column in a FitsTable. The supplied null value is assigned to the TNULLn keyword in the FITS header associated with the FitsTable. A value in the named column is then considered to be null if 1) it equals the null value supplied to this function, or 2) no value has yet been stored in the cell.

As well as setting a new null value, this function also returns the previous null value. If no null value has been set previously, a default value will be returned. This default will be an integer value that does not currently occur anywhere within the named column. If no such value can be found, what happens depends on whether the column contains any cells in which no values have yet been stored. If so, an error will be reported. Otherwise (i.e. if there are no null values in the column), an arbitrary value of zero will be returned as the function value, and no TNULLn keyword will be stored in the FITS header.

A flag is returned indicating if the returned null value was set explicitly by a previous call to this function, or is a default value.

A second flag is returned indicating if the named column contains any null values (i.e. values equal to the supplied null value, or cells to which no value has yet been assigned).

#### Synopsis

int astColumnNull( AstFitsTable $\ast$this, const char $\ast$column, int set, int newval, int $\ast$wasset, int $\ast$hasnull )

#### Parameters:

##### this
Pointer to the FitsTable.
##### column
The character string holding the name of the column. Trailing spaces are ignored.
##### set
If non-zero, the value supplied for parameter " newval" will be stored as the current null value, replacing any value set by a previous call to this function. If zero, the value supplied for parameter " newval" is ignored and the current null value is left unchanged.
##### newval
The new null value to use. Ignored if " set" is zero. An error will be reported if the supplied value is outside the range of values that can be stored in the integer data type associated with the column.
##### wasset
Pointer to an int that will be returned non-zero if the returned null value was set previously via an earlier invocation of this function. Zero is returned otherwise. If the named column does not exist, or an error occurs, a value of zero is returned.
##### hasnull
Pointer to an int that will be returned non-zero if and only if the named column currently contains any values equal to the null value on exit (i.e. " newval" if " set" is non-zero, or the returned function value otherwise), or contains any empty cells. If the named column does not exist, or an error occurs, a value of zero is returned. If a NULL pointer is supplied for " hasnull" , no check on the presence of null values will be performed.

#### Returned Value

##### astColumnNull()
The null value that was in use on entry to this function. If a null value has been set by a previous invocation of this function, it will be returned. Otherwise, if " set" is non-zero, the supplied " newval" value is returned. Otherwise, a default value is chosen (if possible) that does not currently occur in the named column. If all available values are in use in the column, an error is reported if and only if the column contains any empty cells. Otherwise, a value of zero is returned. A value of zero is also returned if the named column does not exist, or an error occurs.

#### Notes:

• The FITS binary table definition allows only integer-valued columns to have an associated null value. This routine will return without action if the column is not integer-valued.