Declaring real constants that print with leading zeros in Fortran

  • Context: Fortran 
  • Thread starter Thread starter onlybarca6
  • Start date Start date
  • Tags Tags
    Constants Fortran
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 5K views
onlybarca6
Messages
5
Reaction score
0
How do I declare constants beginning with "zero" in Fortran to get the output beginning with zero ?

If I declare :

REAL, parameter :: tension = 0.025

I get the output:

2.500000E-02



Thanks in advance
 
Physics news on Phys.org
I think you want to look at FORMAT descriptors.