-1

When coding in Fortran IV, why are the first eight columns left empty?

6
  • 2
    When coding in Fortran IV, why are I hope that OP meant When coding in Fortran IV, why were ... Nov 3, 2016 at 7:51
  • 1
    cant be a very useful code if they are actually all empty.
    – agentp
    Nov 3, 2016 at 11:31
  • The documentation describes it well stackoverflow.com/documentation/fortran/2103/… Nov 3, 2016 at 11:50
  • If you worked with punched cards you should have known anyway.
    – LilyM
    Nov 3, 2016 at 22:07
  • Some know everything w...s on this site. Not that knowing Fortran is God knows what asset.
    – LilyM
    Nov 3, 2016 at 22:28

2 Answers 2

0

These columns are reserved mainly for three reasons:

a) Column 0 is either blank or contains "c" or "*" when the line will be a comment;

b) Columns 1-5 are used to labels. These labels are used to GOTO instructions; and,

c) The use of column 6 indicates that the line is a continuation of the previous line.

You may see more about this here.

0

FORTRAN is a fixed-format language - harking back to its origins and punch-cards. This means the position of text on a line conveys meaning.

Typically the first 8 characters are blank. But they can be filled with labels (eg. line numbers) or line continuation markers at specific positions.

So the first eight characters are not always empty. However your code is positioned from column 8 onward so that it is interpreted as instructions (as opposed to labels, etc.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.