Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Numeric to Character

royxu
Beginner
302 Views
Hi,
I tried to convert my numeric value to character value. I knew in Windows System, I can use the following code to convert numerical variable A to character variable B.
***********
dim A,B
A=200.98
B=CSTR(A)
***********
However in Linux system, CSTR is not defined. Is there a way to convert numeric to character in Fortran Linux?

Thanks for any advice!

Roy
0 Kudos
1 Reply
TimP
Honored Contributor III
302 Views
Here is a previous forum post on Fortran internal write, which you could look up in lang_for.pdf which comes with ifort. Choose a format appropriate to the range of expected input, perhaps '(f8.0)'. As suggested in the forum posts, the list-directed formatting mentioned in lang_for may not be best for you.
http://softwareforums.intel.com/ids/board/message?board.id=5&message.id=15025
0 Kudos
Reply