program format_examples

  implicit none
  real :: x=123.4
  integer :: n=44
  character(len=20) :: fmt
  
  print "(f5.1, a, i4.4)", x, " and ", n

!-- this will do the same thing as above but using two lines
  fmt = "(f5.1, a, i4)"
  print fmt, x, " and ", n
  
!-- line feed 
  print "(a, /, a, /, a)", "These character strings", &
    "all appear", "on separate lines."
 
!-- tab descriptor 
  print "(t30, i5, t50, i5, t10, i5)", 33, 44, 55
  
!-- repeating
  print "(3i4)", 12, 89, 910
  print "(3(i4,///))", 222, 444, 666
  
end program format_examples