CAT_TYFMT

Construct a character representation of a CAT data type

Description:

Construct a character string representation of a CAT data type and append it to a character string.

CAT data types are represented using an integer code (here argument DTYPE) with a further integer variable (here argument CSIZE) giving the size of character strings. A character representation of the data type is constructed from these integer numbers. This character string representation is (deliberately) identical to that used by HDS.

The constructed value is appended to the input string, starting at element POSN+1 of the input string (using the input value for POSN). On output POSN is set to the new length of the string (cf. the CHR routines).

If an illegal CAT data type is input, the assembled string contains an error text, but an error status is deliberately not raised. This behaviour is adopted because CAT_TYFMT is just formatting a character string and an invalid data type is not really an error for it.

Invocation

CALL CAT_TYFMT (DTYPE, CSIZE; STRING, POSN; STATUS)

Arguments

DTYPE = INTEGER (Given)
Code for a CAT data type.
CSIZE = INTEGER (Given)
Size of a CAT character string.
STRING = CHARACTER() (Given and Returned)
The character string into which the data type is to be appended.
POSN = INTEGER (Given and Returned)
The last non-blank element of STRING. VALUE is inserted into STRING starting at the element given by input value of POSN+1. On output POSN is set to the new length of the string, again excluding trailing blanks.
STATUS = INTEGER (Given and Returned)
The global status.

Copyright

Copyright (C) 1999 Central Laboratory of the Research Councils

Bugs:

None known