Silverfrost Forums

Welcome to our forums

+1.00

21 May 2020 2:11 #25477

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) ?

a=1 
write(*,'(f5.2)') a

No typing of '+' sign manually like below please

a=1 
write(*,'(1h+,f5.2)') a
21 May 2020 7:12 #25482

I Googled it and came up with S, SP and SS are sign edit descriptors.

21 May 2020 4:30 #25491

Thank you Paul, I decently had doubts it exists, last time I heard about it was 45 years ago 😃

Please login to reply.