number to string in FORTRAN
number to string in FORTRAN
(OP)
How to convert number to string in FORTRAN and vice versa? Thanks.
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS Come Join Us!Are you an
Engineering professional? Join Eng-Tips Forums!
*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting GuidelinesJobs |
number to string in FORTRAN
|
number to string in FORTRANnumber to string in FORTRAN(OP)
How to convert number to string in FORTRAN and vice versa? Thanks.
Red Flag SubmittedThank you for helping keep Eng-Tips Forums free from inappropriate posts. Reply To This ThreadPosting in the Eng-Tips forums is a member-only feature.Click Here to join Eng-Tips and talk with other members! |
ResourcesWhat is rapid injection molding? For engineers working with tight product design timelines, rapid injection molding can be a critical tool for prototyping and testing functional models. Download Now
The world has changed considerably since the 1980s, when CAD first started displacing drafting tables. Download Now
Prototyping has always been a critical part of product development. Download Now
As the cloud is increasingly adopted for product development, questions remain as to just how cloud software tools compare to on-premise solutions. Download Now
|
RE: number to string in FORTRAN
! 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
Dan
www.dtware.com