how to concat two lines in fortran

Hi

Im writing a file in fortran and I have a problem with two lines
      WRITE(8,*) "splot '",TRIM(PATH),TRIM(INAME),"' with pm3d notitle,"//
     &" 'DIFUSOR24IN.txt' with lines notitle"

where PATH: 'c:\PRUEBA\' and INAME: 'archivo.dat'


but when the file is created it show me the following exit:
 splot 'C:\PRUEBA\archivo.dat
 'with pm3d notitle, 'DIFUSOR24IN.txt' with lines notitle

and that is a problem because I need it in one line, like:
  splot 'C:\PRUEBA\archivo.dat' with pm3d notitle, 'DIFUSOR24IN.txt' with lines notitle

what Im doing wrong???????
altariamx2003Asked:
Who is Participating?
 
Mark BullockQA Engineer IIICommented:
You put your line break in the middle of the string enclosed in quotes.
Try this:
       WRITE(8,*) "splot '", TRIM(PATH), TRIM(INAME), 
     & "' with pm3d notitle 'DIFUSOR24IN.txt' with lines notitle"

Open in new window

0
 
Mark BullockQA Engineer IIICommented:
Which compiler are you using?
Did you try removing the continuation character, like this?
WRITE(8,*) "splot '", TRIM(PATH), TRIM(INAME), "' with pm3d notitle 'DIFUSOR24IN.txt' with lines notitle"

Open in new window

0
 
altariamx2003Author Commented:
im using fortran 77
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.