Understanding Common Blocks in Fortran 77

  • Context: Fortran 
  • Thread starter Thread starter *FaerieLight*
  • Start date Start date
  • Tags Tags
    Blocks Fortran
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 3K views
*FaerieLight*
Messages
43
Reaction score
0
Hi

I'm having some trouble with understanding the whole concept of the common block in Fortran 77.

Here is an example:

common /hmat/ a,b,c,d

It means that all the variables a,b,c,d are all contained in hmat. But does hmat need to be defined previously for the above example to make sense? Or can the first time you refer to it be in a common block code, as above? And if all the variables are stored in hmat, how do I open hmat to see them?

Thanks
 
Physics news on Phys.org