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

Type of variables mer ,tmpmonth, tmpday,tmphour,tmpminute

  1. Oct 30, 2009 #1
    type of variables " mer ,tmpmonth, tmpday,tmphour,tmpminute"

    May you kindly help me with :

    1 . the type of following variables ( in FORTRAN ) ?

    mer ,
    tmpmonth, tmpday, tmpyear and
    tmphour,tmpminute,tmpsecond,tmphund

    2 . " Warning: Variable MER is used before its value has been defined "
    how it must be defined ? and also about all above variables .

    Much much thanks
     
  2. jcsd
  3. Oct 31, 2009 #2

    Mark44

    Staff: Mentor

    Re: type of variables " mer ,tmpmonth, tmpday,tmphour,tmpminute"

    For 1, I don't know if the current versions of FORTRAN still do this, but the older versions, like FORTRAN 77, used to assocation types with variable names. Names that started with i, j, k, l, m, or n were INTEGER. Variable names that started with other letters were REAL.

    So, if that rule is still applicable, mer is of type INTEGER, and all the others are of type REAL.

    2. You should never use a variable before it has been defined; i.e., given a value.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook