When I was in Uni, in Fortran IV, we used to be able to write a program like this
program main
integer his days, her days, total of days
his days = 15
her days = 25
total of days = his days + herdays
write(5,100) total of days
100 format(1X, I10)
stop
end program
I tried building this as an F77 program and it compiled and ran. I don't know if spaces were explicitly allowed in F77 but I remember writing programs with spaces in variables in Fortran IV (66). This builds and runs in gfortran, Powerstation 4, Silverfrost and an old g77 compiler. Presumably it will work on the IVF compiler too (since IVF was Powerstation4 in a previous life). I don't have acces to one right now. If I tell the compiler it is an F90/95... program, it doesn't even compile.
f90test.f90:2:17:
integer his days, her days, total of days
1
Error: Syntax error in data declaration at (1)
f90test.f90:4:6:
his days = 15
1
Error: Unclassifiable statement at (1)
f90test.f90:5:6:
her days = 25
1
Error: Unclassifiable statement at (1)
f90test.f90:6:6:
total of days = his days + herdays
1
Error: Unclassifiable statement at (1)
f90test.f90:8:21:
print *, total of days
1
Error: Syntax error in PRINT statement at (1)
The two questions are
- were spaces allowed in variable names in F77? All the references I can find don't actually say that spaces were allowed or maybe the authors didn't know that spaces were allowed
- were spaces in variable names explicity removed in F90?