Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magic number defining maximum length of the input file name #34

Open
GoogleCodeExporter opened this issue Mar 14, 2015 · 0 comments
Open

Comments

@GoogleCodeExporter
Copy link

Magic numbers in the code are bad. 

Right now structure of the code is full of them. One of such magic numbers - 
maximum length of the input file name.

What do we have right now:

ggeom.F90
line 21 
character(len=60)   :: ofile
----
dqmc_2dperl.F90,
line 51 
character(len=60) :: ofile
----
dqmc_dfg.F90
line 19
integer, parameter :: slen = 60
line 29
character(8), parameter :: TYPE_STR(3) =(/"Real*8  ","Integer ,"Char(60)"/)
line 662
character(len=60)      :: iname
----
dqmc_geom_wrap
line 29
character(len=60), intent(in)     :: gfile
----
dqmc_hubbard.F90
line 632
character(len=60) :: fname
----
dqmc_util.F90
line 1149
character(len=60), intent(out) :: fname
line 1151
character(len=60) :: outname
-----------------------------------------------------
How can we do this in such a manner that maximum length of the input file name 
is defined as a parameter in one place and rest of the files will just use this 
parameter. So that if we need to change it it will require to change only one 
number in one file. How can we do this?

Original issue reported on code.google.com by iglovi...@gmail.com on 13 Apr 2014 at 4:23

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant