PDA

View Full Version : type of variables " mer ,tmpmonth, tmpday,tmphour,tmpminute"


nnnnn
Oct30-09, 03:37 AM
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

Mark44
Oct31-09, 02:27 AM
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.