- Jul 8, 2010
Wait, you can do (5,*) and (6,*)? I did (*,*) for both read and write.
(5,*) and (6,*) is what you are supposed to do , but you can also do (*,*) in some cases:Standard FORTRAN reserves two UNIT numbers for I/O to user. They are:
UNIT = 5 for INPUT from the keyboard with the READ statement
UNIT = 6 for OUTPUT to the screen with the WRITE statement
Most versions of FORTRAN will also let you use the ASTERISK (*) for I/O to the TERMINAL. The asterisk can be used with both the READ and WRITE statements, thus there is no need to remember whether 5 or 6 is for input or output.