### DAT_CLEN

Obtain character string length

#### Description:

The routine returns the number of characters required to represent the values of a primitive object. If the object is character-type, then its length is returned directly. Otherwise, the value returned is the number of characters required to format the object’s values (as a decimal string if appropriate) without loss of information.

#### Invocation

CALL DAT_CLEN( LOC, CLEN, STATUS )

#### Arguments

##### LOC = CHARACTER $\ast$ ( DAT__SZLOC ) (Given)
Primitive object locator.
##### CLEN = INTEGER (Returned)
Character string length.
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Notes:

• The value returned by this routine is equal to the default number of characters allocated to each element whenever a primitive object is mapped using an access type of “_CHAR” (i.e. without specifying the length to be used explicitly).

• If this routine is called with STATUS set, then a value of 1 will be returned for the CLEN argument, although no further processing will occur. The same value will also be returned if the routine should fail for any reason.