Re: Converting string to Integer, Real, etc...
- From: *** Hendrickson <***.hendrickson@xxxxxxx>
- Date: Wed, 27 Dec 2006 17:17:33 GMT
Jeremy wrote:
How can I convert a string to an integer and other types? What about the reverse? I do not see an intrinsic for it.It's called an internal read or internal write. in effect, you
Jeremy
use a character variable as the "file name" and read or write
the I/O list. Any book on Fortran should cover it. You do
things like
read(character_variable, format) list of variables
to "convert a string to an integer".
You want to be a little careful with a "string". Technically,
Fortran doesn't have them. It has character variables and they
are a little different from C strings. In particular, they have a
fixed length and don't have any special termination character.
Blank fill happens automagically in places where you might not
expect it.
*** Hendrickson
.
- Follow-Ups:
- Re: Converting string to Integer, Real, etc...
- From: dpb
- Re: Converting string to Integer, Real, etc...
- From: Beliavsky
- Re: Converting string to Integer, Real, etc...
- References:
- Converting string to Integer, Real, etc...
- From: Jeremy
- Converting string to Integer, Real, etc...
- Prev by Date: Re: Converting string to Integer, Real, etc...
- Next by Date: Re: Converting string to Integer, Real, etc...
- Previous by thread: Re: Converting string to Integer, Real, etc...
- Next by thread: Re: Converting string to Integer, Real, etc...
- Index(es):