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 

Hex Format for

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



Joined: 20 Aug 2014
Posts: 12

PostPosted: Thu Aug 21, 2014 4:28 pm    Post subject: Hex Format for Reply with quote

x1 = 12.75

WRITE ( *, 8 ) x1
8 FORMAT ("Hex Value is ", Z16 )

This fails Is there a way around this?
Bob
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1885

PostPosted: Fri Aug 22, 2014 1:01 am    Post subject: Reply with quote

The hex format Z16 works with integer types. For a real number, use instead something similar to

Code:
write(*,'(Z8)')transfer(x1,integer)
Back to top
View user's profile Send private message
srfpala



Joined: 20 Aug 2014
Posts: 12

PostPosted: Fri Aug 22, 2014 4:36 pm    Post subject: Hex Format for Reply with quote

Thank you.
It worked for me.
Bob
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