The CHARACTER FUNCTION statement takes the following form:
CHARACTER[*len] FUNCTION nam [*len] [([p [,p] . . . ])]
If you specify CHARACTER*(*), the function assumes the length declared for it in the program unit that invokes it. A passed- length character function can have different lengths when it is invoked by different program units. If len is an integer constant, the value of len must agree with the length of the function specified in the program unit that invokes the function. If you do not specify len, a length of one is assumed. The optional length specification following nam is not permitted if the length has already been specified following the keyword CHARACTER.