Character-returning function of unknown length
问题 How to use character function of where the result is of unknown length initially? The trim() function, I understand, shows that it is possible not to specify the length of returning string. For example: write (*,*) trim(str) will return only part of the string without trailing spaces. This function does not have any idea about the length of returning string before the call. Or trim() function has limitations? On more variant is to find original code of trim() function. I have found (Returning