Re: read or write "how to convert integer to string?"
- From: Mike <SulfateIon@xxxxxxxxx>
- Date: Thu, 06 Sep 2007 12:55:53 -0000
On Sep 6, 8:36 pm, Gordon Sande <g.sa...@xxxxxxxxxxxxxxxx> wrote:
On 2007-09-06 09:19:51 -0300, Mike <Sulfate...@xxxxxxxxx> said:
Hi
In "how to convert integer to string?"
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread...
One
uses
============
character(len=20)::MyStr
integer::i
i=10
write(MyStr,'(i5.5)') i
============
I don't understand.
Why don't we use "read(MyStr,'(i5.5)') i "?
Mike
If I already know the value of 'I' then "write ( ... ) I"
but if I want to get a value for "I" the "read ( ... ) I"
The "( ... )" is a file and format the first time you learn
about input and output. Later you learn the the file can be
a string.
So
Will "read(i,'(a)')MyStr" convert MyStr to integer?
Mike
.
- Follow-Ups:
- Re: read or write "how to convert integer to string?"
- From: Paul van Delst
- Re: read or write "how to convert integer to string?"
- From: Richard Maine
- Re: read or write "how to convert integer to string?"
- From: Dan Nagle
- Re: read or write "how to convert integer to string?"
- From: Gordon Sande
- Re: read or write "how to convert integer to string?"
- From: Les
- Re: read or write "how to convert integer to string?"
- References:
- read or write "how to convert integer to string?"
- From: Mike
- Re: read or write "how to convert integer to string?"
- From: Gordon Sande
- read or write "how to convert integer to string?"
- Prev by Date: Re: read or write "how to convert integer to string?"
- Next by Date: Re: read or write "how to convert integer to string?"
- Previous by thread: Re: read or write "how to convert integer to string?"
- Next by thread: Re: read or write "how to convert integer to string?"
- Index(es):
Relevant Pages
|
Loading