View previous topic :: View next topic |
Author |
Message |
srfpala
Joined: 20 Aug 2014 Posts: 12
|
Posted: Thu Aug 21, 2014 4:28 pm Post subject: Hex Format for |
|
|
x1 = 12.75
WRITE ( *, 8 ) x1
8 FORMAT ("Hex Value is ", Z16 )
This fails Is there a way around this?
Bob |
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Fri Aug 22, 2014 1:01 am Post subject: |
|
|
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 |
|
|
srfpala
Joined: 20 Aug 2014 Posts: 12
|
Posted: Fri Aug 22, 2014 4:36 pm Post subject: Hex Format for |
|
|
Thank you.
It worked for me.
Bob |
|
Back to top |
|
|
|