1 05/31/80  New FORTRAN Conversions
  2 
  3 This info segment provides a list of syntactic differences between the
  4 input formats of the old FORTRAN compiler and the new one.  If the
  5 source program compiles without errors, but the program does not run
  6 as expected, refer to new_fortran_differences.gi.info or
  7 new_fortran_extensions.gi.info for a list of semantic differences
  8 between the compilers.
  9 
 10 Card-image format is the same for both compilers and is described
 11 fully in the ANSI standard for the FORTRAN language.  The old compiler
 12 allows some syntactic extensions when card-image format is used.  The
 13 free-form format accepted by each compiler is very different.
 14 
 15 
 16 Free-form Differences:
 17 The new compiler requires that the first non-blank character on a
 18 continuation line be an ampersand character (&).  The old compiler has
 19 no continuation requirements, as its parsers determined from the
 20 context when a statement was completely parsed.
 21 
 22  1. If a percent character (%) immediately precedes a newline
 23     character, the old compiler ignores both characters.  For the new
 24     compiler, the percent sign must be deleted and an ampersand placed
 25     on the continuation line.
 26 
 27 
 28  2. The old compiler allows statements to be continued implicitly,
 29     however, finding all occurances of implicit continuation is a
 30     tiresome task.  There are some simple tests that should find most
 31     cases.
 32 
 33     Lines that end with "(", "+", "-", "*", "^", and "," are obviously
 34     continued onto the next line.  An ampersand character must be
 35     placed at the beginning of the continuation line.  Note -- "/" is
 36     omitted because a data statement always ends with one.
 37 
 38     Lines the begin with ")", "+", "-", "*", "/", "^", ",", quote ("),
 39     or apostrophe (') are continuation lines.  An ampersand should
 40     precede the actual first character.  The new compiler requires
 41     that the first non-blank character of a continuation line be an
 42     ampersand character (&).  The user is free to insert any number of
 43     blanks or tabs before the ampersand.
 44 
 45 
 46  3. The new compiler requires that all statement labels be declared at
 47     the beginning of a line.  The old compiler allows statement labels
 48     to be declared immediately following a newline character or a
 49     semicolon.
 50 
 51  4. The new compiler does not allow a semicolon to appear on an end
 52     line.
 53 
 54 
 55 General Differences:
 56  1. The new compiler does not allow character strings delimited by a
 57     quote character (") to contain any quote characters.  Character
 58     strings delimited by an apostrophe character (') cannot contain
 59     any apostrophe characters.  [This difference has been removed.
 60     Quote characters may be inserted in character strings delimited
 61     with quote characters by doubling the quotes in the string.  This
 62     is also true for apostrophes in strings delimited by apostrophes.]
 63 
 64  2. The new compiler does not allow double precision octal constants.
 65     All octal constants are assumed to describe a 36 bit word.  If an
 66     octal constant contains more than 12 digits, the rightmost 12
 67     digits are used.  [This difference has been removed.  Double
 68     precision octal constants may be used with double precision and
 69     complex data.]
 70 
 71 
 72  3. The new compiler does not allow signed octal constants.
 73 
 74  4. The new compiler treats all real constants without a double
 75     precision exponent as single precision.  The old compiler converts
 76     single precision constants to double precision if the constant
 77     appears in the text with more than nine digits.  [This difference
 78     has been removed.]
 79 
 80  5. The old compiler allows the user to skip over array elements
 81     within a data statement by allowing the user to not specify a
 82     value.  For example--
 83 
 84       data array /1, 2, , 4, 2* /
 85 
 86     This form is not allowed by the new compiler.
 87 
 88 
 89  6. Statement ordering for each program unit is as follows:
 90 
 91       block data, subroutine, or function statement
 92       implicit statement
 93       declarative statements
 94       statement function definitions
 95       executable statements
 96       end line
 97 
 98     Each section, except the end line, is optional.  Format and data
 99     statements can appear anywhere in the program unit after the
100     implicit statement and before the end line.  Comment lines may
101     appear anywhere before the end line.
102 
103 
104 Card-image:
105  1. The old compiler allows short forms for the logical values .true.
106     and .false. (.t. and .f.).  The new compiler does not.
107 
108  2. The new compiler does not allow the semicolon character (;)
109     within card-image source segments.
110 
111 
112 Notes: Card-image format is dangerous to use in an interactive
113 environment because text editing could result in a line that contained
114 more than 72 text characters.  It is therefore advisable to convert
115 all card-image format source segments to free-form format.  A simple
116 conversion consists of:
117 
118  - delete columns 73 through 80,
119  - all initial lines have a blank in column 6,
120  - all continuation lines have blanks in columns one through five
121  - all continuation lines have an ampersand in column 6,
122  - if desired, convert all letters not within character string
123    constants to their lowercase form.