home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / fortran / 5212 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.6 KB

  1. Path: sparky!uunet!opl.com!hri.com!spool.mu.edu!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
  2. From: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: compiling FORTRAN IV on Unix f77
  5. Message-ID: <C1J750.111@news.cso.uiuc.edu>
  6. Date: 27 Jan 93 21:17:22 GMT
  7. References: <1k6e6cINNmqo@bigboote.WPI.EDU>
  8. Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
  9. Reply-To: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
  10. Organization: MRL - UIUC
  11. Lines: 51
  12.  
  13. In article <1k6e6cINNmqo@bigboote.WPI.EDU>, bugsy@yoyodyne.WPI.EDU (Christopher Sean Moran) writes:
  14. |>Help me... I have a program called VORLAX which I need to compile.
  15. |>It was written and compiled originally on CDC FORTRAN IV.  All
  16. |>I have access to is Unix f77.  I have tried to compile it, but
  17. |>its a no go.  One problem is the first line
  18. |>
  19. |>PROGRAM VORLAX(INPUT,OUTPUT, etc)
  20. |>
  21. |>the compiler doesnt like the parenthesis after the program 
  22. |>declaration.  Past that there are no other problems.
  23.  
  24. Ah, good old days!  The parenthesis above were a CDC extension
  25. providing a sort of i/o redirection.  You could run the program by
  26. something like
  27. VORLAX,FOO,BAR.
  28. which worked as vorlax < foo > bar would work on Unix.
  29. But you could redirect many files with arbitrary fortran unit
  30. numbers.
  31.  
  32. |>I do get an executable after compiling if I take the stuff
  33. |>in the parenthesis out. But UNIX dumps my core every time
  34. |>I run the program.  Can anyone help me?
  35.  
  36. As opposed to Fortran 90 vs Fortran 77, Fortran 77 is not downward 
  37. compatible with Fortran 66 (CDC's FORTRAN IV is Fortran 66).
  38. In particular, DO loops behave in a different way, and in Fortran 66
  39. they are *always* executed at least once. So that
  40.       A=0.
  41.       DO 100 I=2,1
  42.       A = A + 1.
  43. 100   CONTINUE
  44.       B = B/A
  45. would run fine with Fortran 66 but dump your core with Fortran 77.
  46. Many compilers have an option to force the old-style behavior; look
  47. for -onetrip or something like that.
  48.  
  49. Of course, your program may dump for other reasons.  The CDC was
  50. a 60 (sic) bits machine using a 6-bit (ugh) character set, not ASCII,
  51. so the potential for breakdowns related to COMMONs, EQUIVALENCEs,
  52. characters stored in reals ... etc are huge.  I would suggest to check
  53. accurately everything dealing with character manipulation.  As in
  54. Fortran 66 there was no CHARACTER type, this is kinda fun. :-)
  55. Good luck!
  56. furio  
  57. --
  58. furio ercolessi    <furio@uiuc.edu>*    <furio@sissa.it>+
  59. * materials research lab, uni illinois at urbana-champaign
  60. + intl school for advanced studies, trieste, italy   
  61.  
  62. "Change nothing and continue with immaculate consistency"
  63.                                       [ Brian Eno, "Oblique Strategies" ]
  64.