- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
I want to convert a real variable into character.
Someone can help me please:mansad:
I tried this :
WRITE(REALVAR,*, IOSTAT=iErr)CHARVAR
but doesn't functionne.
PLEASE HELP!!
Thanks in advance.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try
REAL REALVAR
CHARACTER*100 CHARVAR
WRITE(CHARVAR,*, IOSTAT=iErr)REALVAR
Ensure that CHARVAR is long enough to take the contents of REALVAR. It is safer to use a definite format, like
WRITE(CHARVAR,'(E14.4)', IOSTAT=iErr)REALVAR
and ensure CHARVAR is longer than 14 characters.

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