- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry my suggestion actually works, I mistyped it in my example!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page