#### Description:

This function serches for a named keyword in a FitsChan. If found, and if the keyword has a value associated with it, a non-zero value is returned. If the keyword is not found, or if it does not have an associated value, a zero value is returned.

#### Synopsis

int astTestFits( AstFitsChan ∗this, const char ∗name, int ∗there )

#### Parameters:

##### this

Pointer to the FitsChan.

##### name

Pointer to a null-terminated character string containing the FITS keyword name. This may be a complete FITS header card, in which case the keyword to use is extracted from it. No more than 80 characters are read from this string. If NULL is supplied, the current card is tested.

##### there

Pointer to an integer which will be returned holding a non-zero value if the keyword was found in the header, and zero otherwise. This parameter allows a distinction to be made between the case where a keyword is not present, and the case where a keyword is present but has no associated value. A NULL pointer may be supplied if this information is not required.

#### Returned Value

##### astTestFits()

A value of zero is returned if the keyword was not found in the FitsChan or has no associated value. Otherwise, a value of one is returned.

#### Notes:

- The current card is left unchanged by this function.

- The card following the current card is checked first. If this is not the required card, then the rest of the FitsChan is searched, starting with the first card added to the FitsChan. Therefore cards should be accessed in the order they are stored in the FitsChan (if possible) as this will minimise the time spent searching for cards.

- An error will be reported if the keyword name does not conform to FITS requirements.

- Zero is returned as the function value if an error has already occurred, or if this function should fail for any reason.

Copyright (C) 2021 East Asian Observatory