PDA

View Full Version : Fortran 77


*FaerieLight*
Jan20-11, 05:00 PM
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

hotvette
Jan21-11, 01:28 PM
The following link shows how to use named common blocks.

http://www-teaching.physics.ox.ac.uk/Unix+Prog/hargrove/tutorial_77/13_common.html