Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integer to string conversion? 2

Status
Not open for further replies.

sagn

Programmer
Jun 7, 2001
166
US
Hi,

Sorry for the elementary question but...

How can I convert an integer, such as 15,
to a string '15'.

I am using compaq Visual Fortran.

Thanks
 
Try

character*80 a
integer i /15/

write (a,1000) i
1000 format(I2)



CaKiwi
 
I do not think this is what I want..

As what you suggests does is not give me the
'string' version of the integer (integer 1 -> string '1')but the symbol associated with the integer.

1 gives me a little heart.

That is unless I have done something wrong here...


 
Ok, try

character*80 a

write (a,1000) 15
1000 format(I2)



CaKiwi
 
AhHa!


OK I understan how to do what I want

Thanks a lot.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top