! To convert a number ( in a variable ) to a string character.
! Write the variable into the string character just as you would write it to an
! external disk file. Character strings are considered to be "internal files" in fortran.
Integer x
Character(50) xstring
x = 12345
Write( xstring, '(i10)' ) x
End
! To convert a character string ( of numeric digits ) to a numeric variable
! Read the value from the character variable ( "internal file" ) and assign its value to ! your numeric variable just as you would if you were reading a value from an external !disk file.
Integer x
Character(50) xstring
xstring = '12345'
Read( xstring, '(i10)' ) x
End