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!

F14.6

Status
Not open for further replies.

AdYrL

Technical User
Oct 18, 2008
5
SG
Hi, i came across this in one of the programs and i had a hard time trying to figure out what F14.6 is. The program goes like this:

write(*,60)pint,(dexp(pi*xi)-dexp(-pi*xi))*dcos(pi*eta)
& /(dexp(pi)-dexp(-pi))

60 format('Numerical and exact values are:',
& F14.6,' and',F14.6,' respectively')
print*,'The value of phi is:',pint

pint is from a sub program above. But what does the F14.6 mean? Is it a format of displaying something?
 
F14.5 is a format, how to display a floating point number. In this case, the number will be displayed at total 14 characters length, with 2 decimal places.
So the 14 characters means: 11 chars (digits) before decimal point, the decimal point and 2 digits after decimal point.

Read about formatted output in a Fortran manual.

 
Oh sorry I wrote about F14.5 a thought about F14.2 :)
 
F14.6 = 14 characters total length, with 6 decimal places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top