<END BLOCK Example Program>
Program end_block_example Implicit None Integer i,tmp Real :: a(10) = [ (i,i=1,10) ] Real :: b(10) = 100 tmp = 42 Do i=1, Size(a) Real tmp tmp = a(i)**3 If (tmp>b(i)) b(i) = tmp End Block exb End Do ! The outer "tmp" is unaffected by the inner one. Print 1, tmp, b 1 Format(1X,I0,10F7.1) End Program
■ Execution Results
42 100.0 100.0 100.0 100.0 125.0 216.0 343.0 512.0 729.0 1000.0