Unmatched Quote

Hi all - new to this forum and compiler. Porting code from Intel compiler that allowed the use of a variable in format specifications within <>, such as

format(<icrw>(es10.2,1x))

I’ve discovered that this is not a feature in PGI. I’m rewriting the output statements to write formats that used this approach to character strings and then use the string in the output statement but I’m running into some problems. Here is my example:

This sequence will generate ‘Unmatched quote’ error

       write(aformat,'(A54,A61,I1,A12)')
     >  "'Percentiles of Protection for Average Concentration'/",
     >  "'SAT File',53X,'NRUNS   Spec     Iwell    DWS       Czero  ',",
     >  icrw,"(4X,'Avg %')"
       write(iofil,aformat)

whereas if I comment out the third line, no error

       write(aformat,'(A54,A61,I1,A12)')
     >  "'Percentiles of Protection for Average Concentration'/",
c     >  "'SAT File',53X,'NRUNS   Spec     Iwell    DWS       Czero  ',",
     >  icrw,"(4X,'Avg %')"
       write(iofil,aformat)

What am I missing?
TIA
Ted

And I just realized this should have been posted under Programming and Compiling - sry

Hi Ted,

I copy and pasted your code snipit and tried compiling it myself. However, it worked for me once I deleted one of the starting white spaces since the comment characters are in the wrong column. I’m not sure if this is your issue or if this was simply an artifact of the cut and paste.

If the extra white space isn’t the issue, can you post a full reproducing example?

Thanks,
Mat

Mat,
Is there a way to attach the files to a post - not seeing how if there is.

No, but feel free to send the reproducer to PGI Customer Service (trs@pgroup.com) and ask them to forward it to me.

-Mat

Leading white space was the issue. Thanks