Help me understand a part of code from a Fortran program

Status
Not open for further replies.

cwjcwjcwj

Full Member level 5
Joined
Nov 8, 2004
Messages
273
Helped
17
Reputation
34
Reaction score
12
Trophy points
1,298
Activity points
1,714
Need help on Fortran!

cre=1.0*(sum(j)-bit(ii,j)*lac(ii,ip))

the code above I get it from a fortran program. And it is a formula. But I just wondering what is the meaning of 1.0 over there?Is it same meaning as 1 times the blacket formula?Thanks.
 

Need help on Fortran!

Yes, you are correct. This is just multiplication of 1 on what is in the brackets. This method is used some times for converting from integer type to float. Check if those arrays are declared as integers and cre as float.
Cheers
 

Re: Need help on Fortran!

yes, what u think is right.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…