Annotation of 43BSDTahoe/new/help/src/f77/source, revision 1.1.1.1

1.1       root        1: .TI F77/SOURCE "Sep. 15, 1984"
                      2: Format of Source Code Accepted by the f77 Compiler
                      3: 
                      4: F77 recognizes standard Fortran 77 source.  Lines with 'C' or '*' in column
                      5: one or that are blank in columns 1-72 are comments.  Other lines have
                      6: the following layout:
                      7: 
                      8: .nf
                      9:          1-5:  statement number field
                     10:            6:  continuation column (continuation if not blank or 0)
                     11:         7-72:  statement body field
                     12:        73-80:  sequence field
                     13: .fi
                     14: 
                     15: Short lines are padded with blanks to column 72.
                     16: 
                     17: The rest of this help file describes non-standard extensions to the
                     18: format and what they mean to f77.
                     19: 
                     20: F77 normally ignores case (except within Hollerith constants and
                     21: character strings); thus a comment may also be indicated by a
                     22: lower case 'c' in column one.
                     23: 
                     24: In character strings, the following backslash escapes are recognized:
                     25: 
                     26: .nf
                     27:        \\n     newline character
                     28:        \\t     tab character
                     29:        \\b     backspace character
                     30:        \\f     form feed character
                     31:        \\0     null character
                     32:        \\'     apostrophe (does not terminate string)
                     33:        \\"     quotation mark (does not terminate string)
                     34:        \\\\    \\
                     35: .fi
                     36: 
                     37: F77 allows strings to be delimited by either apostrophes (') or double
                     38: quotes (").  Whichever starts the string must also end the string.
                     39: 
                     40: Variable names may be up to 16 characters in length, and all 16 characters
                     41: are significant.
                     42: 
                     43: Instead of using spaces to skip to column 7, a tab may be used.
                     44: Continuation lines may be indicated by '&' in column one.  In both
                     45: these cases, the statement body field starts with the character after
                     46: the tab or '&' and continues to the last character of the source line
                     47: whether before or after column 72.
                     48: 
                     49: This can effect the length of Holleriths and strings that are split across
                     50: several lines.  This is rare, but is documented here for completeness.
                     51: In the following example, there are no trailing blanks in the source
                     52: file.  Tabs are used in the first format statement to skip to the
                     53: statement body field, blanks are used in the second format statement:
                     54: 
                     55: .nf
                     56:                print 100
                     57:        c         tab between '100' and 'format'
                     58:        100     format ( 'abcdefghijklmn
                     59:             .opq')
                     60: 
                     61:              print 200
                     62:        c         spaces between '200' and 'format'
                     63:        200     format ( 'abcdefghijklmn
                     64:             .opq')
                     65:                end
                     66: .fi
                     67: 
                     68: The printout is:
                     69: 
                     70: .nf
                     71:        abcdefghijklmnopq
                     72:        abcdefghijklmn                                        opq
                     73: .fi
                     74: 
                     75: Because of the tab after '100' in the line containing format 100,
                     76: that line is not padded with blanks;
                     77: thus the 'opq' in the next line immediately follows
                     78: the 'abcdefghijklmn' in the string in the format
                     79: and also in the output.
                     80: 
                     81: Since blanks were used between '200' and 'format' in the line
                     82: containing format 200,
                     83: that line is padded with blanks out to column 72 so 'opq'
                     84: is separated from 'abcdefghijklmn' by 40 blanks in the format and
                     85: in the output.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.