On 2007-10-01 13:44+0100 Andrew Ross wrote: > > Alan, > > It appears that your recent updates to example 23 to tidy up strings > have broken compilation using the ifort compiler on my system. This is > an with the old-ish version (8.1) but it is in wide use. The problem > seems to be that it doesn't like the string concatenation operator //. > A quick test program seems to suggest that gfortran (4.1) also doesn't > allow this. The problem in both cases seems to be that the // gets > confused with the / for the data statement. g77 works ok. > > Statements like > print *,"Hello"//" World" > work with all 3 compilers, although ifort adds an extra blank space in > when concatenating the strings.
Ugh. Why in the world would they add a blank when concatanating character strings? That's just an ifort bug in my view. > > Looks like this might be best avoided for compatibilities sake. Thanks for the test results for gfortran (which I no longer have access to for PLplot tests since PLplot requires a newer gfortran than is installed on my two boxes) and ifort. The old method of continuing a long string in data statements was inserting an extra blank (at least for g77) corresponding to the continuation. That's almost as bad as the ifort concatanation issue, but I suppose it could be justified; there is nothing terminating the string on the first line that is continued so assuming a trailing blank character there makes a small degree of sense. Anyhow, I have crossed my fingers and assumed this string continuation behaviour was universal with Revision 7918. This should compile for all the non-g77 compilers, and I have checked it gives good results (agreement with C) for the g77 case. Could you please check whether it gives good results for the the non-g77 compilers accessible to you? If it doesn't, then we could go with an assignment statement with string concatanation rather than continuation. Of course, ifort will give the wrong answer in that case (extra inserted blank), but to my mind that is their implementation issue and certainly not the behaviour one would expect in general with string concatanation. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel