Problem: Old Code/Older Compiler 
Author Message
 Problem: Old Code/Older Compiler

Hello...

The following sequence of code is giving a bellyache
to the CDC FTN 4.4 compiler (a fortran-IV compiler with
some extensions that ended up in F-77):

      WRITE(6,1)
    1 FORMAT(" PLEASE SEND THE RESULTS OF THIS RUN TO:"//
     $       " COMPUTER SCIENCE DEPARTMENT"/
     $       " UNIVERSITY OF CASTALIA"/
     $       " AMSTERDAM, HOLLAND"/)

The code in question originally had single quotes,
which needed to instead be double-quotes. The problem
here seems to be in the right way to do the statement
continuation... I've tried characters other than the $,
but the compiler still barfs...

This is a vintage program being resurrected for a vintage
system; suggestions of get-a-newer-compiler are appreciated
but not appropriate...

tia,
-doug q



Sun, 11 Sep 2005 06:04:08 GMT  
 Problem: Old Code/Older Compiler

Quote:
> Hello...

> The following sequence of code is giving a bellyache
> to the CDC FTN 4.4 compiler (a FORTRAN-IV compiler with
> some extensions that ended up in F-77):

>       WRITE(6,1)
>     1 FORMAT(" PLEASE SEND THE RESULTS OF THIS RUN TO:"//
>      $       " COMPUTER SCIENCE DEPARTMENT"/
>      $       " UNIVERSITY OF CASTALIA"/
>      $       " AMSTERDAM, HOLLAND"/)

> The code in question originally had single quotes,
> which needed to instead be double-quotes. The problem
> here seems to be in the right way to do the statement
> continuation... I've tried characters other than the $,
> but the compiler still barfs...

> This is a vintage program being resurrected for a vintage
> system; suggestions of get-a-newer-compiler are appreciated
> but not appropriate...

The line continuations look fine.  Mostly need to make sure that they
are *EXACTLY* in column 6.  (And the first column is col 1 - not 0).
Columms really do matter *A LOT*.  The exact column information
isn't preserved in copying to a usenet posting, so I can't tell
whether or not you've got it right.  Its is awfully easy to get them
wrong...

particularly if you don't have a suitable keypunch and
card reader to go with the compiler.  :-)

I almost commented about the "concatenation" which wouldn't work with
that vintage compiler, but barely caught it before making that
particular kind of fool of myself.  The // here is, of course, not
concatenation, but is just 2 "linefeeds" in a row.

--
Richard Maine                       |  Good judgment comes from experience;
email: my last name at host.domain  |  experience comes from bad judgment.
host: altair, domain: dfrc.nasa.gov |        -- Mark Twain



Sun, 11 Sep 2005 06:21:40 GMT  
 Problem: Old Code/Older Compiler
On Tue, 25 Mar 2003 17:04:08 -0500, "Douglas H. Quebbeman"

Quote:

>      WRITE(6,1)
>    1 FORMAT(" PLEASE SEND THE RESULTS OF THIS RUN TO:"//
>     $       " COMPUTER SCIENCE DEPARTMENT"/
>     $       " UNIVERSITY OF CASTALIA"/
>     $       " AMSTERDAM, HOLLAND"/)

>The code in question originally had single quotes,
>which needed to instead be double-quotes. The problem
>here seems to be in the right way to do the statement
>continuation... I've tried characters other than the $,
>but the compiler still barfs...

Well, let's see.  First of all, the double-quotes should be
apostrophes for FORTRAN 77.

The other possible problem is that $ is not a member of the Fortran
character set, therefore some compilers might not like it being used
as continuation.  Try & - and make sure that the character is in
column 6 (with five spaces before it - no tabs!)


Steve Lionel
Software Products Division
Intel Corporation
Nashua, NH

User communities for Intel Fortran and Compaq Visual Fortran:
  http://intel.com/IDS/community



Sun, 11 Sep 2005 06:28:09 GMT  
 Problem: Old Code/Older Compiler

Quote:

> On Tue, 25 Mar 2003 17:04:08 -0500, "Douglas H. Quebbeman"

> >      WRITE(6,1)
> >    1 FORMAT(" PLEASE SEND THE RESULTS OF THIS RUN TO:"//
> >     $       " COMPUTER SCIENCE DEPARTMENT"/
> >     $       " UNIVERSITY OF CASTALIA"/
> >     $       " AMSTERDAM, HOLLAND"/)

> >The code in question originally had single quotes,
> >which needed to instead be double-quotes. The problem
> >here seems to be in the right way to do the statement
> >continuation... I've tried characters other than the $,
> >but the compiler still barfs...

> Well, let's see.  First of all, the double-quotes should be
> apostrophes for FORTRAN 77.

Well, CDC FTN 4.4 was not an f77 compiler.  It was f66 (with a ton
of extensions, like most f66 compilers).  If I recall correctly the
CDC didn't even have an apostrophe in the character set (anyway
in display code character set - the compiler didn't support the
6/12 character set).  My copy of Grisham (Assembly language programming
for the Control Data 6000 series) doesn't show an apostrophe, but
I'd need to check the Fortran manuals (I don't see on ein reach)
to make absolutely sure that one of the wierd characters might not
have been interpreted differently in Fortran.

Quote:
> The other possible problem is that $ is not a member of the Fortran
> character set,

Yes it is.  Even in f66.  Indeed, it is the only character that is in
the standard character set and has no other identified use outside of
a comment, character context (f77), or Hollerith (f66).  This made it a
particularly popular choice for continuation character because it
minimized the possibility of confusion.

Quote:
> Try &

The ampersand, on the other hand, is not in the Fortran character set
of f66 or f77 (or in CDC display code).  It was added in f90.

Quote:
> column 6 (with five spaces before it - no tabs!)

Tabs aren't a possibility on a CDC of that era.

--
Richard Maine                       |  Good judgment comes from experience;
email: my last name at host.domain  |  experience comes from bad judgment.
host: altair, domain: dfrc.nasa.gov |        -- Mark Twain



Sun, 11 Sep 2005 06:56:13 GMT  
 Problem: Old Code/Older Compiler

Quote:
> Well, let's see.  First of all, the double-quotes should be
> apostrophes for FORTRAN 77.

Jeez, that new-fangled f77 stuff.  Are you sure they shouldn't be
replaced by Hollerith constants?

Quote:
> The other possible problem is that $ is not a member of the Fortran
> character set, therefore some compilers might not like it being used
> as continuation.  Try & - and make sure that the character is in
> column 6 (with five spaces before it - no tabs!)

I wish I could remember the ancient ways of the CDC 60-bit words, 6-bit
bytes, and extended characters.  At least there was the problem that
some characters, notably lower case letters, required two 6-bit bytes,
while some, like upper-case letters and numbers, only one.  Putting one
of the two-byte extended characters in column 6 likely would result in
compilation errors.  Lots of fun to count up the number of bytes in a
Hollerith constant.  I remember once when I had a Hollerith constant
with a VT-102 escape sequence for flashing reversed video and got the
count wrong.  The resulting Christo had random chunks of flashing
reversed video... lots of fun.  Would have been more fun had there been
an escape sequence for auto ram loopback check for the terminal in there.

--
write(*,*) transfer((/17.392111325966148d0,3.6351694777236872d228, &
6.0134700169991705d-154/),(/'x'/)); end



Sun, 11 Sep 2005 07:08:31 GMT  
 Problem: Old Code/Older Compiler

Quote:

> Hello...

> The following sequence of code is giving a bellyache
> to the CDC FTN 4.4 compiler (a FORTRAN-IV compiler with
> some extensions that ended up in F-77):

>       WRITE(6,1)
>     1 FORMAT(" PLEASE SEND THE RESULTS OF THIS RUN TO:"//
>      $       " COMPUTER SCIENCE DEPARTMENT"/
>      $       " UNIVERSITY OF CASTALIA"/
>      $       " AMSTERDAM, HOLLAND"/)

> The code in question originally had single quotes,
> which needed to instead be double-quotes. The problem
> here seems to be in the right way to do the statement
> continuation... I've tried characters other than the $,
> but the compiler still barfs...

> This is a vintage program being resurrected for a vintage
> system; suggestions of get-a-newer-compiler are appreciated
> but not appropriate...

> tia,
> -doug q

Just out of curiousity (I'm like some of the other responders, it's been
so long since I used the CDC FTN compiler I don't recall much in the way
of details and unlike Richard, I <know> I tossed the CDC manuals when I
last moved, they're definitely not close at hand :)) -- what is the
error message specifically? --Assuming, of course, that one of the other
suggestions hasn't solved the problem.


Sun, 11 Sep 2005 08:52:26 GMT  
 Problem: Old Code/Older Compiler
If the $ is in the wrong place this may well cause problems: under
FTN4/FTN5 the $ was an extension to allow multi-statement lines, the
same job as the semi-colon now in Fortran 90.
Quote:


> > Hello...

> > The following sequence of code is giving a bellyache
> > to the CDC FTN 4.4 compiler (a FORTRAN-IV compiler with
> > some extensions that ended up in F-77):

> >       WRITE(6,1)
> >     1 FORMAT(" PLEASE SEND THE RESULTS OF THIS RUN TO:"//
> >      $       " COMPUTER SCIENCE DEPARTMENT"/
> >      $       " UNIVERSITY OF CASTALIA"/
> >      $       " AMSTERDAM, HOLLAND"/)

> > The code in question originally had single quotes,
> > which needed to instead be double-quotes. The problem
> > here seems to be in the right way to do the statement
> > continuation... I've tried characters other than the $,
> > but the compiler still barfs...

> > This is a vintage program being resurrected for a vintage
> > system; suggestions of get-a-newer-compiler are appreciated
> > but not appropriate...

> > tia,
> > -doug q

> Just out of curiousity (I'm like some of the other responders, it's been
> so long since I used the CDC FTN compiler I don't recall much in the way
> of details and unlike Richard, I <know> I tossed the CDC manuals when I
> last moved, they're definitely not close at hand :)) -- what is the
> error message specifically? --Assuming, of course, that one of the other
> suggestions hasn't solved the problem.



Sun, 11 Sep 2005 18:06:57 GMT  
 Problem: Old Code/Older Compiler
This may or may not be useful:

http://www.spies.com/~aek/pdf/cdc/60132700A_ChippewaFtn_May66.pdf

Louis



Sun, 11 Sep 2005 18:44:26 GMT  
 Problem: Old Code/Older Compiler
What lies to the right of the printable code?  I have seen some exciting
behaviours from old compilers handling continuation lines when the
right margin wasn't padded to column 72 with spaces.

Please post the final solution when you solve it!

Good luck,

John.



Sun, 11 Sep 2005 21:18:03 GMT  
 Problem: Old Code/Older Compiler

Quote:

> Just out of curiousity (I'm like some of the other responders, it's been
> so long since I used the CDC FTN compiler I don't recall much in the way
> of details and unlike Richard, I <know> I tossed the CDC manuals when I
> last moved, they're definitely not close at hand :)) -- what is the
> error message specifically? --Assuming, of course, that one of the other
> suggestions hasn't solved the problem.

I tried to send a somewhat length reply to you,
but I got a bounce...

-dq



Sun, 11 Sep 2005 21:25:06 GMT  
 Problem: Old Code/Older Compiler

Quote:




> > Just out of curiousity (I'm like some of the other responders, it's been
> > so long since I used the CDC FTN compiler I don't recall much in the way
> > of details and unlike Richard, I <know> I tossed the CDC manuals when I
> > last moved, they're definitely not close at hand :)) -- what is the
> > error message specifically? --Assuming, of course, that one of the other
> > suggestions hasn't solved the problem.

> I tried to send a somewhat length reply to you,
> but I got a bounce...

> -dq

Sorry, I forgot to update--the ISP somehow munged by old mailbox w/the
underscore...but anyway, why not just post it here so all can see it?
Surely it can't be <that> large an error message on the one line?

Try dpbozarth at swko dot net



Sun, 11 Sep 2005 21:45:39 GMT  
 Problem: Old Code/Older Compiler

Quote:
Douglas Quebbeman writes:

 > Hi Richard! I hope you don't mind my contacting you directly...

Well, only if you don't mind that I copy my reply back to the
newsgroup.  :-)  I usually avoid doing that without explicit
prior permission, but I think I'll make an exception here and
assume that it is ok.  Just hope I haven't misguessed on that;
I've been known to misguess on such things before, which is why
I try to be cautious.

I don't mind for this particular case, but in general, I prefer that
things like this be kept on the newsgroup for multiple reasons.

1. If I don't have anything to say or don't feel like I have the time,
   I don't feel obligation to reply to a newsgroup posting, as there
   are also other people there to respond.

2. Other people may well notice things that I miss.  Happens all the
   time.  I'm egotistacal enough to think I'm pretty good at some of
   this stuff, but I'm not so blind as to have failed to notice that
   I make my share of errors and overlook my share of things that
   should have been obvious.  And then there are the things that are
   just outside of the bounds of things I know anything about.  Yours
   is in an area I have had experience in, but I've had people send
   me personal email about very compiler-specific problems with compilers
   that I've never in my life used - I sometimes have no idea why they
   picked me to ask the question of.

3. Other people on the newsgroup will be interested in seeing the
   answer.  I've seen at least one followup where someone explicitly
   asked to be told what the resolution of this one turns out to be.

P.S. I'm going to be on travel for a week, starting mid-day Friday.
If you'd hit me then, I'd be much less inclined to look at it.  When
I'm on travel, I squeeze in the email and newsgroup reading typically
during short breaks or around midnight or so after I've finished my
other work.  And sometimes my modem connection is flaky.  So I'm much
less inclined to take the time to study anything in much detail.

On to the real question...

Quote:
> Well, I seem to have been making an assumption that was false...
> the error message I was getting actually flagged a statement
> a bit farther down in the source, but I *assumed* (there's
> that word!) the compiler had gotten lost...

 > Here's the compiler listing with error messages... as you can see,
 > it's initially flagging the statement at line 27, which invokes
 > the library function SECONDS()....

Hmm.  In fact, every single one of its gripes is about that function.
And reading the text of the gripe...

 >        27    FE    SECOND    A COMMA, LEFT PAREN., =,.OR., OR .AND. MUST BE
 > FOLLOWED BY A NAME, CONSTANT, LEFT PAREN.,-,.NOT., OR +.

I note that the invocations of second() do indeed have a left paren
that is not followed by one of those things.  It is followed by a
right paren.

Hmm....  Dredge through memory....  Dredge...  Dredge...

Somewhere I recall questions about functions that have no arguments.
Such functions are, after all, a bit strange in some senses.  They
don't fit the mathematical definition of a function very sensibly.
They are certainly legal in f77 - pretty explicitly so.  But in
f66?.... A quick skim of the standard leaves me unsure.   I'm not even
sure that the standard addresses the point either way, but I don't
want to take the time to study in enough depth to be certain.

Particularly considering the way that your error message reads, I bet
that's the problem.

The next question is what to substitute for it.  Did the CDC have a
built-in named SECOND?  Hmm.....I think so....said very
hesitatingly...  Something like that....But perhaps it was a
subroutine instead of a function?  Somebody have a manual more handy
than mine?  I think I have one somewhere, but I don't see it.  Might
be at home.  Or I might have eventually tossed it.  Here's where it
would be good to toss this back to the newsgroup...

--
Richard Maine                       |  Good judgment comes from experience;
email: my last name at host.domain  |  experience comes from bad judgment.
host: altair, domain: dfrc.nasa.gov |        -- Mark Twain



Mon, 12 Sep 2005 01:00:18 GMT  
 Problem: Old Code/Older Compiler

Quote:

>...  Dredge through memory....  Dredge...  Dredge...

> Somewhere I recall questions about functions that have no arguments.
> Such functions are, after all, a bit strange in some senses.  They
> don't fit the mathematical definition of a function very sensibly.
> They are certainly legal in f77 - pretty explicitly so.  But in
> f66?.... A quick skim of the standard leaves me unsure.   I'm not even
> sure that the standard addresses the point either way, but I don't
> want to take the time to study in enough depth to be certain.

> Particularly considering the way that your error message reads, I bet
> that's the problem.

In fact, it is.  My trusty (and very dusty) CDC FTN Extended RM states
that functions must have at least one arg.

I looked in the F66 Standard as well.  (In fact, I was going to post the
question here, but see that Doug Q already started the discussion...)
I could not find anything about a minimun number of required arguments
in it.  So this seems to be yet another area where the F66 Standard
leaves things open.

Quote:
> The next question is what to substitute for it.  Did the CDC have a
> built-in named SECOND?  Hmm.....I think so....said very
> hesitatingly...  Something like that....But perhaps it was a
> subroutine instead of a function?

Actually, the SECOND routine does exist in the CDC Fortran lib and is
documented to be callable as either a function or subroutine.  In either
case, it needs a single actual arg passed to it.

BTW, Doug got his code to work!

Walt
-...-
Walt Spector
(w6ws at earthlink dot net)



Mon, 12 Sep 2005 22:00:26 GMT  
 Problem: Old Code/Older Compiler


(snip)

Quote:
> In fact, it is.  My trusty (and very dusty) CDC FTN Extended RM states
> that functions must have at least one arg.

> I looked in the F66 Standard as well.  (In fact, I was going to post the
> question here, but see that Doug Q already started the discussion...)
> I could not find anything about a minimun number of required arguments
> in it.  So this seems to be yet another area where the F66 Standard
> leaves things open.

I think you have to read the standard like a lawyer.

It is in section 2, Basic Terminology.  "At various places in this standard
there are statements with associated lists of entries.  In all such cases
the list is assumed to contain at least one entry unless an explicit
exception is stated."

It then uses SUBROUTINE as an example.  Note that in the description of
SUBROUTINE the argumentless for is stated, as expected without an
parentheses.

Otherwise, it would seem to require at least three, as it is written

FUNCTION  f(a1, a2, ..., an)

If you read the ... as more optional elements, you could say that a1, a2,
and an are required!

I think the minimum FORMAT is  (/).

-- glen



Tue, 13 Sep 2005 06:27:16 GMT  
 Problem: Old Code/Older Compiler

Quote:



> (snip)

> > In fact, it is.  My trusty (and very dusty) CDC FTN Extended RM states
> > that functions must have at least one arg.
> ...
> It is in section 2, Basic Terminology.  "At various places in this standard
> there are statements with associated lists of entries.  In all such cases
> the list is assumed to contain at least one entry unless an explicit
> exception is stated."

Good spotting!  Thanks.

Walt
-...-
Walt Spector
(w6ws at earthlink dot net)



Tue, 13 Sep 2005 13:01:16 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. Old code and new compilers

2. Problem installing old MS Fortran 4.0 compiler

3. TBrowse: Teach an old dog old tricks

4. Old Old rmcobol

5. (OT) Back in the old old days ...

6. Problem compiling old code with gfortran

7. Clipper compiler -- old

8. old documents about cecil (NT-Compiler 4.1.c)

9. Old Clipper compilers bought/sold

10. Old C Compilers

11. Old version of ACU compiler/DBMaker for Linux?

12. OLD circa 68 COBOL compiler question...

 

 
Powered by phpBB® Forum Software