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!

CHARACTER difference 1

Status
Not open for further replies.

bobo12

Programmer
Dec 26, 2004
74
US
any difference between
CHARACTER*127 FMAT
CHARACTER FMAT(127)
 
If you're converting to Java/C/C++, no difference at all. It is easier to slice a CHARACTER*127.

Code:
CHARACTER*127 CHOPUP
CHARACTER A(127)
CHARACTER*4 SLICE
! Copy first 4 chars of chopup to slice
SLICE = CHOPUP(1:4)
! Assign first 4 items of A to slice
DO I = 1, 4
   SLICE(I:I) = A(I)
ENDDO
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top