Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does 0D0 mean?

Status
Not open for further replies.

gberz3

Programmer
Dec 13, 2007
4
US
Hi All,

My apologies for what is likely a rookie Fortran question, but, what does 0D0 signify at the URL below?:


I would think that it's just setting the value to 0, but I can't be sure. Not to mention, it wouldn't seem like 0 is a proper fit for at least one of the variables. And it seems that none of the Fortran documentation I've acquired directly addresses 0D0.

Thanks in advance.
 
Double precision 0.

First 0 is the value
D is the same as E meaning x10 to the power of
Second 0 is the exponent
 
Thank you. Generally, where would I find that out? I'd like a consistent resource to bookmark. I've scoured Language References,Google, and Wikipedia (including cross-references and external links) and found no direct reference to items like that.

One question related to the code itself (if you took a look) why would one set a value to "0D0" only to add it to another value in the loop? If the value set to "0D0" never changes then it seems rather pointless. I could understand the need to *enforce* double precision, but why repeatedly add it through each iteration? Of course, this points to the fact that I'm likely missing something.

Regards
 
Actually, I see that the value set to "0D0" is changed later so nevermind on that part of my question.

Regards.
 
You'll find the description where they are describing constants. eg 123 for integers, .true. for logicals, 'xyz' for characters, 1.23E4 for reals and 1.23D5 for DP. 0D0 is just a variation on 1.23D5.

I can't really recommend a book or a website. Since I use several languages, I just look for differences in syntax and notation and that's it for me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top