6.3.1 CHVAL

1.
Function
Converts a floating-point value into a character-string according to the character format specification. There is also an option for automatically generating a format specification that will restrict the length of the string to less than or equal to 8 characters (less than or equal to 3 significant digits). 
2.
Call
CALL CHVAL(CFMT,VAL,CVAL)
3.
Explanation of Parameters
CFMT (C *( *)) The character format specification or the option interpreted by CHVAL. When the first 4 characters of CFMT begins with '(', it is recognized as a character format specification. In all other cases, the following 4 specifications can be chosen for the option.
    'A': automatically generate a format specification.
    'B': 'A' plus remove the decimal point and all trailing "0"s.
    'C': 'B' plus remove all zeros in front of the decimal point.
    'D': 'C', however, only when exponential form is used.
    For example, specify  'A', '(F6.1)' for CFMT.
VAL (R) The floating-point value to convert into character string.
CVAL (C *( *)) Returns the characterized floating-point value. An argument longer than or equal to 8 characters. 
4.
Notes
(a)
CFMT must be shorter than or equal to 16 characters.
(b)
An integer-type field descriptor can be specified as CFMT. In such a case, the part ofVAL more than 4 digits below the decimal point is rounded off in the character-string conversion.
(c)
CHVAL automatically left-justifies the characters. In other words, when the floating-point value 1.2 is characterized, CHVAL will return the same value, '1.2', for either '(F4.1)'or '(F8.1)'.
(d)
In some systems, a zero will not be placed to the left of the decimal point when handling a value smaller than 1 with a F-type field descriptor. In such a case, this routine will add a 0.
(e)
The character 'e' (lower case) is used to represent the exponent part.