Quantcast
Channel: Intel® Software - Intel® Visual Fortran Compiler for Windows*
Viewing all articles
Browse latest Browse all 5691

Read hex byte into character(1)

$
0
0

I have a character variable of length 2, eg ch2 = '4f', which I want to read into a character variable of length 1, ch1, which must contain the ASCII representation of the 2-char string, ie. Z'4f' ie. ch1='O'.  Is there an elegant way to do this in a READ / FORMAT statement?  Something like read(ch2,'(z2)') ch1?


Viewing all articles
Browse latest Browse all 5691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>