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

  • Thread starter Thread starter nnnnn
  • Start date Start date
  • Tags Tags
    Type Variables
AI Thread Summary
The discussion centers on the types of specific variables in FORTRAN, specifically "mer," "tmpmonth," "tmpday," "tmpyear," "tmphour," "tmpminute," and "tmphund." It notes that in older versions of FORTRAN, such as FORTRAN 77, variable types were often inferred from their names: variables starting with the letters i, j, k, l, m, or n were typically INTEGER, while those starting with other letters were REAL. Therefore, "mer" is likely INTEGER, while the others are likely REAL. Additionally, a warning about using the variable "MER" before it has been defined highlights the importance of initializing variables before use to avoid errors in the code.
nnnnn
Messages
5
Reaction score
0
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
 
Technology news on Phys.org


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.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...
Back
Top