To convert a number/integer to a string, you need to write the variable into the string character.
Integer I
Character* str
I = 9999
Write( str, '(i10)' ) I
End
To convert a string to number or integer, you need to read the strign and assign it to the integer
Integer I
Character* str
I = 9999
read( str, '(i10)' ) I
End
Thursday, June 10, 2010
int2str and str2num in fortran, How convert string to integer number of vice versa.
Posted by
vicky
at
12:18 PM
Subscribe to:
Post Comments (Atom)
Popular
- Unbelievable invention of Bheema's skeleton or Bhima's son Gadotkach like skeleton found: A hoax mail
- Online status of permesso di soggiorno on the website of Polizia di Stato
- SBI transaction on 30-Nov-0019 for INTERNET BANKING, what is this for?
- Matlab boxplot: how to change the line width (LineWidth) and color of the lines?
- Convert Longitude 0-360 to -180 to 180 or 180W-180E in fortran and matlab, transform lat lon coordinates
thank you
ReplyDeleteThanks!
ReplyDeleteThanks, this helped me!
ReplyDeleteThanks, this helped me out. Fortran can be a little stubborn on this type of thing.
ReplyDeletevery helpful , thanks !
ReplyDeleteThanks a lot for this right to the point help. I will consider this blog first for future questions.
ReplyDelete