Recent content by benacquista

  1. B

    Fortran Fortran 95: WRITE to screen changes output to WRITE to file

    Thanks, after using -Wtabs (and commenting out the initialization of the variable) I could see the one other warning. Unfortunately, gfortran did not catch the uninitialized variable. It did catch an unused variable in the declarations of the main program.
  2. B

    Fortran Fortran 95: WRITE to screen changes output to WRITE to file

    I tried this by commenting out the place where I initialized the variable, and compiled with gfortran using -Wall. It didn't catch the uninitalized variable, but it flagged every one of my tabs as a "Nonconforming tab character". I'm not quite sure what that means, but since I tab liberally in...
  3. B

    Fortran Fortran 95: WRITE to screen changes output to WRITE to file

    I tried alphysicist's suggestion and it worked. I'm trying to figure out why, and my only guess is that the WRITE statement causes the stored value of 'a' to change ... otherwise, it remains equal to 1 (it's value when selip returns a number). If it remains equal to 1, then the following calls...
  4. B

    Fortran Fortran 95: WRITE to screen changes output to WRITE to file

    Sorry! This has got me so confused, I'm confusing others. My first statement is correct. If the WRITE statements are there, then it works. If I comment out the WRITE statements, then I get weird results.
  5. B

    Fortran Fortran 95: WRITE to screen changes output to WRITE to file

    Thanks for the suggestion. What you describe is precisely the problem. Unfortunately, I tried an actual format statement (using FMT='(E7.6)' ) and I still get the screwy results unless I comment out the three WRITE(*,*) statements. Perhaps this is a bug in the gfortan compiler?
  6. B

    Fortran Fortran 95: WRITE to screen changes output to WRITE to file

    I have a short code that calculates the running median for three columns of data in an input file and writes the running medians out to three columns of data in an output file. I use Numerical Recipe subroutines and functions to compute the running median. If I include a WRITE(*,*) directly...
Back
Top