forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

+1.00

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General
View previous topic :: View next topic  
Author Message
DanRRight



Joined: 10 Mar 2008
Posts: 2206
Location: South Pole, Antarctica

PostPosted: Thu May 21, 2020 3:11 am    Post subject: +1.00 Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 6459
Location: Salford, UK

PostPosted: Thu May 21, 2020 8:12 am    Post subject: Reply with quote

I Googled it and came up with S, SP and SS are sign edit descriptors.
Back to top
View user's profile Send private message AIM Address
DanRRight



Joined: 10 Mar 2008
Posts: 2206
Location: South Pole, Antarctica

PostPosted: Thu May 21, 2020 5:30 pm    Post subject: Reply with quote

Thank you Paul, I decently had doubts it exists, last time I heard about it was 45 years ago Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> General All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group