<DEALLOCATE Example Program>

Program deallocate_example
  Real, Allocatable :: a(:)
  Read *, n
  Allocate(a(n))
  a(n) = n
  Print *, a(n)
  Deallocate(a)
  Allocate(a(n+3))
  a(n+3) = n + 3
  Print *, a(n+3)
End Program

<Example input 1>

4

■ Execution Results

  4.0000000
  7.0000000

<Example input 2>

11

■ Execution Results

  11.0000000
  14.0000000