At 11:54 AM 5/17/00 -0400, Vanwormer, Laura A. wrote:
>Hello,
>
>I am new to this list-server and not sure if this is an appropriate question
>but I'm so frustrated and not sure where to turn for help. I am attempting
>to get an old fortran program to run on a virtual linux machine that is on
>my pc. There is a lot of formatted I/O in this program and I cannot get my
>output to match the sample output. One problem seems to be with the
>declaration of an array. Nowhere in the program is it defined to be a
>character array but that is how it is used in the format statements.
>Somehow the compiler or program seems to be taking the variables to be 2 or
>4 characters long yet the format statements called for lengths of 6. I
>added a CHARACTER*6 COM(6,3) statement and am now getting an error message
>when I compile that says this is an invalid declaration of or reference to
>that variable. Any suggestions? Thank you. Replies can be sent to
>[log in to unmask]
>
>Laura Van Wormer
>
Sounds like an 1960's program written for some machine such as the IBM 7094
or Univac 1107,8 series of machines.
No character type existed in those days, so character data was stuffed into
a 'word'. Oh yes, I'm guessing these brands of machine because they were
word oriented
machines, all values were stored in one 'word' of 36 bits. Now, via Hollerith
or similiar means, it was possible to stash 6 characters (both machines use
6 bit
characters) into one word. If your program contained the statement:
DIMENSION COM(6,3)
and no other type statements, then your character data is stored into a two
dimensional REAL array.
If you wish to email a sample of the code, I can probably take a look and
make a good guess about what is going on. Would want to see any code
refernencing
the array, including esp. all input and output statements.
As another responder mentioned, the task could be anywhere from pretty easy
to difficult.
Good luck
Ralph, Fortranning since 1960.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|