I want to write a long string (>= 5000 characters) to standard out
and am having problems. It keeps on crashing on me with a 'record
too long' error even with the following subroutine in place.
(Pardon the fixed form everybody, I'm modifying an old code here).
And yes, the subroutine is in a module.
What are my options? Shall I try to pass the string as an array
of characters to "C" and then call "puts"? I know that I could
write the string to a separate, named file but I'd rather have it
go to standard out if I can accomplish this without too much pain.
I'm working on a UNIX system (SGI-IRIX6.5.14 with version
7.3.1.2) of the SGI F90 compiler.
Thanks for any help,
Catherine
--
-------------------------------------------------------------------------
Catherine Moroney phone : (818) 393-3392
Jet Propulsion Laboratory fax : (818) 393-4802
MailStop 169-315 email : [log in to unmask]
4800 Oak Grove Drive
Pasadena, CA 91109-8099
C ************************************************************
C
SUBROUTINE PUT_STRING(CHSTRING)
C
C ************************************************************
IMPLICIT NONE
CHARACTER(LEN=*) :: CHSTRING
INTEGER :: IC,NCHAR,ILEN
CHARACTER(LEN=1) :: XCHAR
nchar = len(chstring)
ilen = len_trim(chstring)
do ic=1,nchar
if (ic > ilen) exit
xchar = chstring(ic:ic)
write(*,'(a)',advance='no') xchar
end do
RETURN
END SUBROUTINE PUT_STRING
|