From: Gib Bogle on 4 Jul 2010 17:15 Philipp E. Weidmann wrote: > I wasn't talking about compilers but about programs produced with > differend compilers. You mean "... output produced ..."
From: Dave Allured on 5 Jul 2010 02:30 Richard Maine wrote: > > Dave Allured <nospom(a)nospom.com> wrote: > ... > > j = len_trim (line) > > if (j > 0) then > > if (line(j:j) == cr) line(j:j) = ' ' > > end if > > end subroutine read_line > ... > > Side note: I do not know whether the protective "if (j > 0)" is > > necessary. Is the evaluation of "line(j:j)" standard conformant when j > > equals 0? > > Yes, the protection is needed because line(j:j) is nonconforming when j > is 0. From f2003: > > "both the starting and the ending point shall be within the range 1, > 2, ... n, unless the starting point exceeds the ending point..." > > One might be able to come up with a "neat hack" to avoid the explicit > test, but the test is probably a lot clearer (and you are less likely to > mess it up, as I almost did in trying to show one such hack, which > wouldn't have worked because I got a piece backwards). Thanks for clearing that up, Richard. --Dave
From: William Clodius on 5 Jul 2010 23:17 fj <francois.jacq(a)irsn.fr> wrote: > On 4 juil, 11:17, "Philipp E. Weidmann" <philipp.weidm...(a)gmx.de> > wrote: > > I'm in the process of modifying a program that was previously compiled > > with ifortran so that it will work with gfortran as well (Windows is my > > testbed), and I have discovered that files written by the ifort-compiled > > version will not work with the gfortran-compiled version. > > > > There are two apparent reasons for this: > > > > 1. The program compiled with ifort terminates lines it writes to a file > > with CRLF, while the gfortran version uses LF only. > > A source file is NEVER produced by a compiler like ifort or gfortran > but only by a text editor ! > <snip> Not always. I have inherited code from a co-worker with that takes as input two files, one a list of gas phase chemical reactions, the other a list of chemical species, and generates a file containing the Fortran code that implements the numerical solution for their gas phase reactions for the species of interest. -- Bill Clodius los the lost and net the pet to email
From: Jerry DeLisle on 6 Jul 2010 02:13 On 07/04/2010 11:26 AM, Dave Allured wrote: > Philipp E. Weidmann wrote: >> >> I'm in the process of modifying a program that was previously compiled >> with ifortran so that it will work with gfortran as well (Windows is my >> testbed), and I have discovered that files written by the ifort-compiled >> version will not work with the gfortran-compiled version. >> >> There are two apparent reasons for this: >> >> 1. The program compiled with ifort terminates lines it writes to a file >> with CRLF, while the gfortran version uses LF only. > The default end of line marker on Cygwin is LF. Cygwin emulates a Unix like environment as much as possible. Therefore on Cygwin, gfortran uses LF. During Cygwin setup, you can ask Cygwin to use CR-LF. The mingw version of gfortran will use the CR-LF convention on windows. I have not attempted to build gfortran under the CR-LF Cygwin world to see if the configury notes the difference and builds gfortran for the CR-LF sequence. Regards, Jerry
From: Philipp E. Weidmann on 6 Jul 2010 03:47 Jerry DeLisle wrote: > On 07/04/2010 11:26 AM, Dave Allured wrote: >> Philipp E. Weidmann wrote: >>> >>> I'm in the process of modifying a program that was previously compiled >>> with ifortran so that it will work with gfortran as well (Windows is my >>> testbed), and I have discovered that files written by the ifort-compiled >>> version will not work with the gfortran-compiled version. >>> >>> There are two apparent reasons for this: >>> >>> 1. The program compiled with ifort terminates lines it writes to a file >>> with CRLF, while the gfortran version uses LF only. >> > The default end of line marker on Cygwin is LF. Cygwin emulates a Unix > like environment as much as possible. Therefore on Cygwin, gfortran uses > LF. During Cygwin setup, you can ask Cygwin to use CR-LF. The mingw > version of gfortran will use the CR-LF convention on windows. I have not > attempted to build gfortran under the CR-LF Cygwin world to see if the > configury notes the difference and builds gfortran for the CR-LF sequence. > > Regards, > > Jerry Thank you, that was very helpful. I have now overcome the problems by reinstalling Cygwin and choosing text mode processing. -- -- Philipp Emanuel Weidmann
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 4 Prev: gui fortran Next: removing /save fortran compiler option |