next up previous contents
Next: PRINT Statement Up: Simple Input / Output Previous: Simple Input / Output

 

PRINT Statement

This is the simplest form of directing unformatted data to the standard output channel, for example,

   PROGRAM Owt
    IMPLICIT NONE
     CHARACTER(LEN=*), PARAMETER :: &
        long_name = "Llanfair...gogogoch"
     REAL :: x, y, z
     LOGICAL :: lacigol
      x = 1; y = 2; z = 3 
      lacigol = (y .eq. x)
      PRINT*, long_name
      PRINT*, "Spock says ""illogical&
               &Captain"" "
      PRINT*, "X = ",x," Y = ",y," Z = ",z
      PRINT*, "Logical val: ",lacigol
   END PROGRAM Owt

produces on the screen,

   Llanfair...gogogoch
   Spock says "illogical Captain"
   X =  1.000  Y =  2.000  Z =  3.000
   Logical val:  F

For more information, click here gif


next up previous contents
Next: PRINT Statement Up: Simple Input / Output Previous: Simple Input / Output

©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997
Not for commercial use.