CS 342 Lecture -*- Outline -*- * quiz on aspects of FORTRAN 1. What are the advantages and disadvantages of checking for out-of-bounds array indexing at run-time? Answer: advantage is more security, Answer: disadvantage is less efficient at run-time. 2. What is an environment? Answer: a function from names to attributes 3. Draw the coutour diagram for the following FORTRAN program: PROGRAM MAIN INTEGER N REAL X,Y C ... END SUBROUTINE F(I,J) COMMON /FOO/ X(20) INTEGER N C ... END SUBROUTINE G(Y) COMMON /FOO/ X(20) INTEGER I ... END 4. What is the scope of the array X in the above program? Answer: the bodies of the subroutines F and G. 5. What are the benefits of FORTRAN's COMMON facility? Answer: sharing and information hiding.