AST_MAPLENC

Get the number of characters in a character entry in a KeyMap

Description:

This function returns the minimum length that a character variable must have in order to be able to store a specified entry in the supplied KeyMap. If the named entry is a vector entry, then the returned value is the length of the longest element of the vector value.

Invocation

RESULT = AST_MAPLENC( THIS, KEY, STATUS )

Arguments

THIS = INTEGER (Given)
Pointer to the KeyMap.
KEY = CHARACTER $\ast$ ( $\ast$ ) (Given)
The character string identifying the KeyMap entry. Trailing spaces are ignored. The supplied string is converted to upper case before use if the KeyCase attribute is currently set to zero.
STATUS = INTEGER (Given and Returned)
The global status.

Returned Value

AST_MAPLENC = INTEGER
The length (i.e. number of characters) of the longest formatted value associated with the named entry.

Notes:

• A function value of zero will be returned without error if the named entry cannot be formatted as a character string.

• A function value of zero will be returned if an error has already occurred, or if this function should fail for any reason.