!
!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
!
!         <<<<<---------------------------------------------->>>>>
!         <<<<<  1.  L A N G U A G E     E L E M E N T S     >>>>>
!         <<<<<---------------------------------------------->>>>>
!
!&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&



!***********************************************************************
!  COMMENTS
!***********************************************************************
! 
! this is a comment line, as it starts with a character !

  A = B   ! this assignment is NOT a comment line

!***********************************************************************
!  STATEMENTS
!***********************************************************************


! Each statement is written on a line
!

   X = (-Y + R_O_D)/(2.0*A)
   X = (-Y + R_O_D)/(2.0*A)           !  may start at any point
   X = ( -Y  +  R_O_D ) / ( 2.0*A )   ! blanks do noty count 


!***********************************************************************
!  CONTINUATION MARKS
!***********************************************************************
!
!  * A line can be 132 character long at most
!  * A long line can be broken into at most 39 multiple lines
!

 X = sqrt ( B + C )/ sin ( THETA )

! may be broken into two lines

 X = sqrt ( B + C )/    &
     sin ( THETA )

 X = sqrt ( B + C )/    &
     sin ( THETA )


!***********************************************************************
!  STATEMENT SEPARATOR
!***********************************************************************
!
!  * Multiple statements can be arranged conveniently onto a 
!    single line and separated by " ; "
!

 A + B = 1.0 ; C = A ; D = EXP (C/B)


!***********************************************************************
!  DATA TYPES
!***********************************************************************
!
!  * There exist 5 INTRINSIC data types
!
!    TWO CLASSES 
!
!    ----  Numeric  ----  + INTEGERS
!                         + REAL 
!                         + COMPLEX
!    ----  Non-numeric -  + STRING
!                         + LOGICAL
!
!
!  * An infinite number of DERIVED data types consisting of 
!    collections of different intrinsic data types 



!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!                  I N T E G E R     C O N S T A N T S
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

   0
   1
   -235
   +276537
  

! The range DEPENDS ON THE PROCESSOR not on the language
!
! A very important concept the KIND 
!                              ----
!
! To be sure that the integer range will be the adequate on ANY computer
! requires to specifiy the KIND 
!
!
  SELECTED_INT_KIND(M) ! Native inquiry function. Returns an integer 
                       ! that is the KIND parameter for integers in the 
                       ! range ( -10**M , 10**M )
                       ! 
                       ! for example 
    
                         SELECTED_INT_KIND(6)  ! appropriate kind 
                                               ! parameter 
                                               ! for integers n 
                                               ! -999999 < n < 999999
! This can be used in constants like this
!

  INTEGER, PARAMETER :: K6 = SELECTED_INT_KIND(6) ! here I am defining 
                                                  ! an integer that is 
                                                  ! the required KIND
                                                  ! parameter
  A = 1565_K6
  B = -275636_K6

!=======================================================================
! The KIND value for a given range may differ on different computers
! so it is important that the range be the same if a given piece 
! of code is to be used on different platforms
!=======================================================================
!

! The KIND() intrinsic function
!

  KIND(1)        ! returns the default KIND
  KIND(A)        ! for the example above. Returns K6
 
! The RANGE() intrinsic function

  N = RANGE (A)  ! N is the numberof decimal places
                 ! In this example on a given computer it would 
                 ! return (at least) 6 



!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!                    R E A L    C O N S T A N T S
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


  A = 1.627E+11
  B = -0.1
  C = .298
  D = 0.2537E-06


! common values are in the range 1.0E-38, 1.0E+38 with a precision of 
! 7 decimal digits


! To be sure that the real range will be the adequate on ANY computer
! requires to specifiy the KIND 
!
!
  SELECTED_REAL_KIND(P,R) ! Native inquiry function. Returns an integer 
                          ! that is the KIND parameter for REAL 
                          ! constants with 
                          !
                          ! * decimal precision at least P 
                          !   (as returned by the function PRECISION() )
                          !
                          ! * and decimal exponent range (at least) R 
                          !   (as returned by the function RANGE() )
                          !
                          ! 

! For example 
    
 INTEGER, PARAMETER :: LONG = SELECTED_REAL_KIND(9,99)  

! will ensure that the constants

 X = 2.256_LONG
 Y = 12.78927_LONG

! have a precision of at least 9 significant decimals and an exponent
! range of at least 1.0E-99, 1.0E+99

! The KIND() finction is also valid for reals 
!

  KIND(1.0)        ! returns the default KIND
  KIND(X)          ! for the example above. Returns LONG
 

! ***** In addition there are two intrinsic functions that return
!       the precision and range 

  PRECISION (X)  ! This would be at least 9
  RANGE (X)      ! This would be at least 99

! **********************************************************************
! DOUBLE PRECISION 
!
! Litteral constants with the exponent letter D are DOUBLE PRECISION
! In FORTRAN 90 these real data type can be conveniently referenced as
! KIND(0.D0)
!
! Example
!
  INTEGER, PARAMETER :: DPK = KIND(0.D0)
  REAL(KIND=DPK) X, Y

  DOUBLE PRECISION X, Y    !  FORTRAN 77
  

!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!                 C O M P L E X    C O N S T A N T S
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

! Complex constants are designated as PAIRS of literal constants
!

  XC = ( -1.278E+02, 0.8632 )

! The first real constant is the REAL part and the second is 
! the IMAGINARY part

! The KIND of a complex constant is 
!
! - If either RE(XC) or IM(CX) is integer  ----> the KIND of the other part
! - If both RE(XC) and IM(CX) are integers ----> the KIND of default reals
! - If both RE(XC) of IM(CX) are reals     ----> the common KIND if of 
!                                                the same KIND
!                                                the KIND of the part with the 
!                                                greater decimal precision
!                                                (depends on the processor if the 
!                                                 decimal precision is identical)




!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!               C H A R A C T E R    C O N S T A N T S
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


! The default type consist in a sequence of (any kind of) symbols
! enclosed in a pair of either apostrophes (') or quotation marks (")

 A = 'I am a string. I contain also blanks (and parentheses)'
 
 A = "I am a string. I contain also blanks (and parentheses)"

 B = '   ' 

! Blanks are significant!

 'A STRING' ! is different from 
 'ASTRING'

! How to include an apostrophe or quotation mark?
! Simple, they are treated as characters and not as delimiters 
! in string delimited by the other type of delimiter 
!
! Example 

 ' HE SAID "HELLO" '           
 " This string contains ' "

! The following is not correct

  ' This string contains ' '      

!
! Alternatively a double delimiter is trated as a character
!
 " HE SAID "" HELLO "" "
 ' This string contains '' '
  
! have the same values as the strings above

! The NUMBER of characters in a string is the string LENGTH
! This may be zero
!
  A = ''

! The string A has LENGTH zero

! LONG STRING. One has to follow the following rule
!
!
 LONG_STRING =                                                   &
              & 'Viens, mon beau chat, sur mon coeur amoureux;   &
              & Retiens les griffes de ta patte,                 & 
              & Et laisse-moi plonger dans tes beaux yeux,       &
              & Mêlés de métal et d''agate.'


! each continuation line MUST begin with an AMPERSAND ( & )
! Any blanks following a TRAILING ampersand or preceding a LEADING
! ampersand are NOT part of the string.



!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!               L O G I C A L    C O N S T A N T S
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

! The default kind has one of two values

  ALOG = .TRUE. 
  BLOG = .FALSE. 

! operations among logical variables are usual logical operations
! AND, OR, XOR 



!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!              N A M E S 
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

! FORTRAN 90 references many different entities by name
!
! * A name consists of between 1 and 31 alphanumeric characters (letters,
!   underscores and numerals.
! * The first MUSR be a letter
!
! Valid names are

 A 
 A_NAME
 A_CONSTANT
 GRAVITATIONAL_CONSTANT
 B001_G
 

! Invalid names are

 1GH
 A THING
 $FLAG

!--------------------------------------------------------------------------
! THE IMPORTANCE OF MNEMONIC NAMES
!
! It is important in a complex code to reference entities by names 
! that bear clear meanings
! For example

  VEL_X  ! might be the X component of velocity in a code that 
         ! integrates numerically Newton equation for a point mass
  
  

!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!                        V A R I A B L E S 
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


! Each of the 5 intrinsic data types seen above may have constants but 
! also variables
!
! VARIABLES MUST BE DECLARED, ACCORDING TO THE THEIR INTRINSIC DATA TYPE
!------------------------------------------------------------------------
!
! The easiest way is through TYPE DECLARATION STATEMENTS
!
   
  INTEGER I
  REAL    X
  COMPLEX XC
  
  CHARACTER STRING
  LOGICAL GATE

! Here all variables have the DEFAULT KIND 
! Explicit requirements are possible 

  INTEGER (KIND=K6)   I
  REAL    (KIND=LONG) X
  
  CHARACTER (LEN=20, KIND=1) STRING   ! Default KIND
 
! Short versions are allowed for


  INTEGER (K6)   I
  REAL    (LONG) X
  
  CHARACTER (20,1) STRING            ! Default KIND
  CHARACTER (20)   STRING            ! ATTENTION: a single specifications 
                                     ! in CHARACTER is ALWAYS interpreted 
                                     ! as the character LENGTH

  CHARACTER*20 STRING                ! OLD SYNTAX - FORTRAN 77 
                                     ! ACCEPTED ALSO IN F90 

!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!
!                 D E R I V E D     D A T A     T Y P E S 
!
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

! It is useful to manipulate obnjects that are more sophisticated than 
! simple INTRINSIC data types
!
! These are calle DERIVED types
!
! Imagine for example that we wished to specify objects representing 
! persons. We require each "object" to be specified by its age, sex,
! name and some identification number
!
! This is accomplished in FORTRAN 90 by custom DERIVED DATA TYPES
!        ==========
! called STRUCTURES
!        ==========

  TYPE PERSON
    REAL AGE               ! default KIND REAL
    CHARACTER(1)  SEX      ! One-letter character (presumably M/F)
    CHARACTER(10) PRENOM   ! Ten-letter character 
    INTEGER ID             ! default KIND INTEGER
  END TYPE PERSON

! This is the definition of the type
!
! In order to create in the code an entity of this type, we just 
! have to declare it. For example we have three individuals in our 
! group whose structures we want to compare/manipulate

  TYPE(PERSON) MARC
  TYPE(PERSON) YANN
  TYPE(PERSON) MELANIE

  REAL X

! MARC, YANN AND MELANIE are composite structure of te type PERSON
! containing 4 separate COMPONENTS
!
! If I want to refer to their separate components I use the 
! 
!    component selector % 

  MARC%ID          ! This is an integer corresponding to MARC's identity number
  MAGALIE%PRENOM   ! This is a 10-character constant 

  REAL AVER_AGES
  INTEGER MAX_ID
  AVER_AGES = ( MARC%AGE + YANN%AGE + MAGALIE%AGE ) / 3.0 ! contains the average 
                                                          ! age of the group
  MAX_ID = MAX( MARC%ID, YANN%ID ) ! contains the highest id number of the 
                                   ! male sub-group

! We will show later what is the meaning of 

  MARC + YANN 

! DERIVED constants can be assigned as INTRINSIC constants

  INTEGER ID
  REAL AGE
  CHARACTER(10) PRENOM
  CHARACTER(1)  SEX
  TYPE(PERSON)  CHARLOTTE
 
  ID = 5623
  AGE = 18.5
  PRENOM = ' CHARLOTTE' 
  SEX = 'F'
 
  CHARLOTTE = PERSON(AGE,SEX,PRENOM,ID)   ! Explicit construction 
                                          ! of a derived data type

  ! This is equivalent to 

  CHARLOTTE = PERSON(18.5,'F',' CHARLOTTE',5623)

  ! Equiv. 

  REAL X(3)
  X(1) = 10.
  X(2) = 0.752
  X(3) = -0.52

! Creates a structure of the kind PERSON with the specified 
! values for the components
!              |
!              |
!           This is the name of the derived data type 
!           there has to be a 
!    
!           TYPE PERSON
!                 .............
!                 .............
!           END TYPE PERSON
!

  TYPE(PERSON)  PERSON5
  PERSON5 = PERSON(78.0,'M',' JEAN-MARC',892) 

! A structure of the kind PERSON can also 
! be created like this 
  
! A component of a derived structure can be a derived structure itself
!
! EXAMPLE
!
! Define a TYPE TRIANGLE containing a TYPE point defined before hand
!

  TYPE POINT    
    REAL X
    REAL Y     
  END TYPE POINT

! Equivalent to

  TYPE POINT    
    REAL X,Y     
  END TYPE POINT
!
! Note that this is equivalent to (but shorter and more concise than!)
!
  TYPE POINT    
    REAL X
    REAL Y     
  END TYPE POINT 

! this notation can be used to concatenate components of the same intrinsic 
! type in a derived structure

  TYPE TRIANGLE 
    TYPE(POINT) A,B,C
  END TYPE TRIANGLE 

! So for example a triangle with vertices in (0.0,0.0), (1.0,0.0) and (0.0,1.0)

!=======================================================================
! EXAMPLE OF CODE FRAGMENT

  TYPE(POINT) A            ! declaration of the structures to be created 
  TYPE(POINT) B
  TYPE(POINT) C
  TYPE(TRIANGLE) T

  A = POINT(0.0,0.0)
  B = POINT(1.0,0.0)
  C = POINT(0.0,1.0)
  T = TRIANGLE(A,B,C)
 
! T has components T%A, T%B and T%C, These are of type POINT 

  T%A    ! this is a constant of type POINT 
  T%A%X  ! this is a constant of type REAL 

!***********************************************************************
! EXERCISE
!
! Imagine a situation where you need a constants of DERIVED
! type, with different components, one of which is itself a constant of 
! some other DERIVED type, such as the type TRIANGLE above.
!
! Write 
!
! 1. The appropriate definitions of your derived structures
! 2. The declaration of your constants
! 3. The definition of your constants
!
!***********************************************************************


!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
!
!         A R R A Y S   O F    I N T R I N S I C    T Y P E
!
!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

! An array is a rectangular set of elements all of the same type
!
! There are a number of ways to declare arrays (static and dynamic). For
! the moment we will only consider arrays of FIXED size
!
  REAL X                              ! Scalar

  REAL, DIMENSION(10)    :: A         ! FORTRAN 90 Syntax 
  INTEGER, DIMENSION(10) :: I

  DIMENSION A(10)                     ! FORTRAN 77 (old syntax)

! This declare an array of length 10, thus comprising 10 real 
! numbers

  A(k) ! This is the k-th element of the array A
  I(k) ! This is the k-th element of the array I


! In general it is possible to declare lower and upper bounds 
! for the array elements other than 1 and 10 (in this example)

  REAL, DIMENSION(2:12) :: A

! This array has components
! A(2), A(#), ..., A(12)

! The array A declared above is one-dimensional (is a vector). 
! But arrays can extend in more than one dimension. 

  REAL, DIMENSION(5,6) :: MATRIX

  REAL, DIMENSION(5,6,0:11,7,-8:8) :: GRID

! The number of dimensions of an array is known as its RANK
! 
! The array GRID has a RANK of 5

! A DERIVED type may contain ARRAY component
!
  
  TYPE DOUBLET
     REAL U 
     REAL, DIMENSION(2) :: DU
  END TYPE DOUBLET

  TYPE(DOUBLET) D

! In this case 

  D%U   ! this a real number, the value of the U component of the derived
        ! type D
  D%DU  ! this an array of real numbers, the value of the DU component 
        ! of the derived type D. The components of this array are        

  D%DU(1) 
  D%DU(2)

! Making reference to components of arrays

  INTEGER NMAX, I, J
  REAL A, B
  REAL, DIMENSION(1000) :: X

  I = 2
  J = 10
  A = X(I+J)    ! one can reference array components also through 
  B = X(I*J)    ! mathematical expressions, provided the results 
                ! is within the declared range 
  I = 100
  J = 200
  A = X(I*J) 
  PRINT*, A

  END

!  ============
!   SUB-ARRAYS 
!  ============
!  Sub-arrays are called SECTIONS in FORTRAN 90. These are portions 
!  of arrays. For example

   X(10:45)    ! An array of length 45 - 10 + 1 = 36 whose
               ! first component is X(10) and whose last 
               ! component is X(45)
   X(10:45)(I)            
 
   REAL, DIMENSION(NMAX,NMAX) :: B
   REAL, DIMENSION(NMAX) :: X
   
   X = B(k,1:NMAX)     ! this is the k-th row of the matrix B


!  ====================
!   VECTOR SUB-SCRIPTS 
!  ====================
!  An array of integers can be used to extract a sub-array (a section) 
!  from another array

   REAL, DIMENSION(10) :: A
   REAL, DIMENSION(5) :: B 
   INTEGER, DIMENSION(5) :: IPOINT

   B = A(IPOINT)

! If for example IPOINT = (1,5,7,8,10)
!
!  B(1) = A(1)
!  B(2) = A(5)
!  B(3) = A(7)
!  B(4) = A(8)
!  B(5) = A(10)
!

! In FORTRAN 90 it is possible to construct arrays "by hand"
! For example, the array IPOINT above could be constructed as 

  IPOINT = (/ 1,5,7,8,10 /)

! Regular sequences can be constructed as 
!
  
  INTEGER, DIMENSION(5) :: ISEQ
  INTEGER I

  ISEQ = (/ I, I=1,5  /)  

! this is the same as 

  `
! Sequences can have a specified STRIDE

  ISEQ = (/ (I, I=2,10,2)  /)  

! (NOTE THE INNER PARENTHESES) is the same as 

  ISEQ = (/ 2,4,6,8,10 /)  

! If an array of reals is needed with a fixed STRIDE this can 
! also be accomplished easily


  REAL, DIMENSION(5) :: SEQ
  INTEGER I

  SEQ = (/ (I*0.1, I=2,8,2) /)

! this is the same as 

  SEQ = (/ 0.2,0.4,0.6,0.8 /)





!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!                  C H A R A C T E R   S U B S T R I N G S 
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


! It is possible to build arrays of characters, as for any other data 
! type
!

 CHARACTER(80), DIMENSION(60) :: PAGE
 
! hence PAGE(3) is the third element of the array and is a string of 
! length 80. You see why I called it page

 
! If I have an array of one-dimensional characters

 CHARACTER, DIMENSION(60) :: LINE

! This is the same as

 CHARACTER(1), DIMENSION(60) :: LINE
 CHARACTER(LEN=1), DIMENSION(60) :: LINE

! A given substring can be referenced as one does for any array of any
! data type 

 SUBSTRING = LINE(I:J)     ! where I, J are of integer type
                           ! but may be ANY intege EXPRESSIONS
                           ! such as
 
 SUBSTRING = LINE(I+1:J)
 SUBSTRING = LINE(I:J*2)

! For example if 

 STRING = (/ 'A', 'B',  'C', 'D',  /)
 I = 2
 J = 3
 SUBSTRING = LINE(I:J) 

! then  SUBSTRING(1) = 'B' and SUBSTRING(2) = 'C'

! CONVENTIONS

 LINE(:I)   ! is equivalent to LINE(1:I)
 LINE(I:)   ! is equivalent to LINE(I:LENGTH(LINE)) 
 LINE(:)    ! is equivalent to LINE(1:LENGTH(LINE))

! If we go back to the PAGE definition 

 CHARACTER(80), DIMENSION(60) :: PAGE

! we can reference a given character ona given line,
! for example the J-th character on the K-the line, as

 PAGE(K)(J:J)



!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
!
!                           P O I N T E R S 
!
!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


! In a language, different names can be made to correspond to different 
! objects or persons, depending on the context. Consider for example:
! 
! " Le president est un homme fidele "
!
! in this moment it will be clear that the word "president" refers to 
! F. Hollande (thus making the statement false). A few years ago 
! (another CONTEXT) the same word would have POINTED to another person,
! N. Sarkozy, making the statement true (for what we know ...).
!
! Similarly, in a computer code it is very useful to be able to use a 
! name that can be made to refer (POINTED) to different objects during
! the execution of the code.
!
! For example, we might write a code that calculates the product of a 
! vector and a matrix, like this
!
!  y_i = SUM_{i=1}^N  A_{ij} x_j
!
! in order to compute the following 
!
!  w = B C z
!
! where B,C are matrices and w,z are vectors. So we can first make 
! x in our code correspond to z and A to C and thus calculate y,
! and then make x correspond to y and A to B to compute w.
! You see the point.
!
! An object that can be made to refer to different objects is called
! a POINTER and MUST be declared with the POINTER attribute
!
 
  REAL, POINTER :: SON
  REAL, POINTER, DIMENSION(:) :: X,Y
  REAL, POINTER, DIMENSION(:,:) :: A


! In the case of an array, only the RANK (i.e. number of dimension) is
! declared. The bounds are taken from the object it POINTS TO.
!

! Besides pointing to existing variables, a POINTER may be given 
! FRESH STORAGE through the command ALLOCATE
!

  ALLOCATE ( X(10) )
  ALLOCATE ( A(I,J) )
  ALLOCATE ( Y(I*J), A(1,1) )

! In the case of arrays, the bounds are specified as for the DIMENSION
! attribute.
! The VERY IMPORTANT new feature with pointers is that 
!
! ANY SCALAR EXPRESSION IS PERMITTED, THUS MAKING DYNAMIC DIMENSIONING
! POSSIBLE
!
! This is a major improvement over FORTRAN 77, which only supported
! static allocation. For example:
!
  ALLOCATE ( X(I-J) )









