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!

Fortran 77 converting string to array of strings

Status
Not open for further replies.

wein3967

Programmer
Jun 28, 2005
3
US
I have been given the task converting some Fortran 77 code. I have a main program that calls a subroutine like so:
Code:
CALL GOD1D(GASP(IFPTN),...)
Now, GASP is a large string array, so it should be passing a single element of position IFPTN, which is a string. The GOD1D subroutine looks like:
Code:
SUBROUTINE GOD1D(GAS,...)
In the GOD1D there is a dimension statement like so:
Code:
CHARACTER*3 GAS(1:799)
So, it appears that this dimension statement converts a passed single string into an array of a specified length and also populates the entire array with the same string value. Is that how the process will always work? I have several variables that seem to under go this same system. Thanks for your help.
 
Declare GAS as
Code:
CHARACTER *(*) GAS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top