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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combining to two integers into a string

Status
Not open for further replies.

reaperprouse

Programmer
Jan 28, 2002
1
GB
Hi all

I'm trying to add to integers together in fortran for make one integer of the comibined lenght's

e.g 1 and 0 into 10
or 0 and 1 into 01
or 1 and 1 into 11

can any one help me figure this out?
 
C EXAMPLE
character * 2 result
int1 = 1
int2 = 0
write(result,'(2i1)')int1,int2
read(result,'(i2)')int3
write(*,*)int3
end
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top