Re: read or write "how to convert integer to string?"



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

.



Relevant Pages

  • RE: capture cell number format with VBA
    ... "Mike H" wrote: ... I have a sheet with various cell formats ... I want to convert the number in the cell to a string containing the number ... Then return the number to it's original format with Round, ...
    (microsoft.public.excel.programming)
  • Re: How to print numbers with dots, regardless of locale
    ... the results of the format is a string. ... 3rd character from the right with a period. ... MyStr as string ...
    (microsoft.public.excel.programming)
  • RE: Problem formatting text in a ListBox
    ... "Mike" wrote: ... > I am trying to format some text that I retrieve from a DB. ... I load the converted (to string) values in an array and then use the following statement: ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)
  • Re: read or write "how to convert integer to string?"
    ... )" is a file and format the first time you learn ... Will "read(i,'(a)')MyStr" convert MyStr to integer? ... Mike ... To convert character MyStr to integer i you would write: ...
    (comp.lang.fortran)
  • RE: capture cell number format with VBA
    ... "Mike H" wrote: ... Can i detect the format with code? ... I have a sheet with various cell formats ... I want to convert the number in the cell to a string containing the number ...
    (microsoft.public.excel.programming)

Loading