As the other answer mentions, free source form is a great idea, but
If for some reason you have to keep the program in fixed source form, then leave 6 spaces (first 6 columns) and start from the 7th column.
The format had the first five columns reserved for statement labels. The first column was used to denote comments by a letter C. The sixth column was used to denote a statement continuation (by inserting any character other than a zero '0'). The last 8 columns were used for card identification and sequencing, which was pretty valuable if you dropped your deck of cards on the floor! The character coding for punched cards had only a limited set of characters and was upper case only.
For this reason, the compiler expects numerical statement labels or blank space for the first 6 columns. Error:Non-numeric character at statement label at (1)
is the result of this.
Source
TLDR: if you must use fixed source form (.f
extension) leave 6 blank spaces and start from the 7th column like this :
program first
print *,'This is my first program'
end program first