Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fortran 90

  1. Jan 16, 2008 #1
    In Fortran I need to output some data as a bitmap image, to visualise results. Problem is, with every WRITE statement it seems to append some unwanted bytes before and after the data itself. I have found out that these are called record delimiters, but I want to turn these off. How?
     
  2. jcsd
  3. Jan 27, 2008 #2
    I have played with f95, and when I ran into trouble I used to post on a site http://www.tek-tips.com
    Try there to see if you get any answers.
     
  4. Sep 23, 2010 #3
    Hi Friends,
    Im trying to compile a small fortran code, but it gives me the following error.
    g77 -o rayinv_vel_modl rayinv_vel_modl.f
    dimension.inc: In subroutine `outputv':
    dimension.inc:5:
    integer mnsg, mnsg1, mnsgf
    1
    dimension.inc:17: (continued):
    & mnsgf=nomi*mnsg, mnsd1=mnsd+mnsgf)
    2
    Invalid declaration of or reference to symbol `mnsgf' at (2) [initially seen at (1)]
    dimension.inc:17:
    & mnsgf=nomi*mnsg, mnsd1=mnsd+mnsgf)
    ^
    Invalid form for PARAMETER statement at (^)


    Can someone help me, whats wrong with the code?

    Thanking you in anticipation

    cheers
     
  5. Aug 30, 2012 #4
    Hi friends;
    I have some problems with my fortran programma.When I compile it, the above errors occur;
    dms0.f: In subroutine `ftltow':
    dms0.f:123: warning:
    call ftltow(gl,gw,S,dtau,0,nmax)
    1
    dms0.f:828: (continued):
    subroutine ftltow(gl,gw,maxl,dtau,bose,nmax)
    2
    Argument #2 (named `gw') of `ftltow' is one precision at (2) but is some other precision at (1) [info -f g77 M GLOBALS]
    dms0.f:123: warning:
    call ftltow(gl,gw,S,dtau,0,nmax)
    1
    dms0.f:828: (continued):
    subroutine ftltow(gl,gw,maxl,dtau,bose,nmax)
    2
    Argument #3 (named `maxl') of `ftltow' is one type at (2) but is some other type at (1) [info -f g77 M GLOBALS]

    What is reason of these errors?

    Thanks
     
  6. Aug 30, 2012 #5
    They are not errors, they are warnings...it says it right there.

    Also it say they are in regards to precision. That means that you have one variables declared with, say, REAL*4 but then you pass it to a function or subroutine and the variable catching this quantity is declared inside the subroutine with, say, REAL*8

    ...something along those line

    Hope it helps.
     
  7. Aug 31, 2012 #6

    uart

    User Avatar
    Science Advisor

    Your variable "S" is defined as a different type (or kind) than that of your variable "maxl". It may be that one or other of these has been left undefined and is using an implicit type.

    BTW. If you're not already doing so, I strongly recommend that you add the line "implicit none" to all of your programs and subroutines.
     
  8. Aug 31, 2012 #7
    Thanks for your help
     
  9. Aug 31, 2012 #8

    jtbell

    User Avatar

    Staff: Mentor

    I second that recommendation. Besides situations like this one, it will prevent problems caused by simply misspelling a variable name. Without "implicit none", this creates a new variable of some default type, without your knowing it.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Fortran 90
  1. Fortran 90 (Replies: 1)

  2. Fortran 90 (Replies: 1)

Loading...