With interest I followed the discussion about Petros' problem, and in particular the tricky solution posted by Richard. Would it also be possible (and how?), if the length of the resulting character string is the outcome of a much more complex character function than len_trim? The reason I'm asking is that I've written a function to convert numbers into character strings, like the internal write, but for special formats, etc., and it keeps annoying me that I always have to use this function wrapped in a trim command, instead of having the trim integrated into the function. TIA for any suggestions. Roland +----------------------------------------------------------------------+ | Roland Schilling Home-Office: +49(89)32929-670 | | Max-Planck-Institut fuer Quantenoptik Phone: +49(89)32905-265 | | Hans-Kopfermann-Str. 1 Fax: +49(89)32905-200 | | D-85748 Garching E-mail: [log in to unmask] | | Germany http://www.geo600.uni-hannover.de | +----------------------------------------------------------------------+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%