View previous topic :: View next topic |
Author |
Message |
DanRRight
Joined: 10 Mar 2008 Posts: 2815 Location: South Pole, Antarctica
|
Posted: Thu May 21, 2020 3:11 am Post subject: +1.00 |
|
|
Minus sign is by definition present in front of numbers if number is negative. But how to push the code below to print the plus sign in front of number (so the code will output +1.00 not 1.00) ?
Code: | a=1
write(*,'(f5.2)') a
|
No typing of '+' sign manually like below please
Code: | a=1
write(*,'(1h+,f5.2)') a
|
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Thu May 21, 2020 8:12 am Post subject: |
|
|
I Googled it and came up with S, SP and SS are sign edit descriptors. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2815 Location: South Pole, Antarctica
|
Posted: Thu May 21, 2020 5:30 pm Post subject: |
|
|
Thank you Paul, I decently had doubts it exists, last time I heard about it was 45 years ago |
|
Back to top |
|
|
|