!sample for variable specification
! R501 - R518

PROGRAM SF
!R505.1
!the same attr_spec must not appear more than once in a given type_declaration_stmt
	INTEGER , POINTER, POINTER :: I
!R505.3
!the "=initialization_expr" must appear if the statement contains a PARAMETER
!attribute 
	INTEGER, PARAMETER::J
!R505.5  
!the "=initialization_expr" must not appear for this object is an object in a 
!named common block
	COMMON /A/B,C
	INTEGER ::B=5
!R505.6
!only when character type can length be specified
	INTEGER   VAR1*10
!R505.8
!an array declared with an ALLOCATABLE attribute must be specified with an
!array_spec that is a deferred_shape_spec_list
	INTEGER,ALLOCATABLE::D(3,4)
!R505.11
!if the POINTER attribute is specified, the TARGET, INTENT, EXTERNAL, or INTRINSIC
!attribute must not be specified
	INTEGER,POINTER,TARGET::E
!R505.12
!if the TARGET attribute is specified, the POINTER, INTENT, EXTERNAL, or INTRINSIC
!attribute must not be specified
	INTEGER,TARGET,EXTERNAL::F
	INTEGER,TARGET,PARAMETER::G=10
!the PARAMETER attribute must not be specified for pointers...
	INTEGER,POINTER,PARAMETER :: l 
	integer , parameter,pointer::k
!R505.14
!the intent attribute may be specified only for dummy arguments
	INTEGER ,INTENT(IN)::L
	REAL , OPTIONAL :: VAR2
!R505.19
!an array must not have both the ALLOCATABLE attibute and the POINTER
!attribute
	INTEGER,POINTER,ALLOCATABLE::M(:)
!R510
!an access_spec attribute may appear only in the scoping unit of a module
	INTEGER, PUBLIC::N

END


FUNCTION  func1(dum1,dum2) result(resu)
!R505.7.1
!only when array specified , can ALLOCATABLE
	INTEGER , ALLOCATABLE :: dum1
!R505.7.2
!only when array specified not as dummy or result , can ALLOCATABLE
	INTEGER , ALLOCATABLE :: dum2(10)
	INTEGER , ALLOCATABLE :: resu(10)
END FUNCTION

FUNCTION  func2(dum1,dum2,dum3) result(resu)
!R505.10
!if the POINTER attribute is specified to a function name, it must be defered
! shape spec
        INTEGER, POINTER :: func2(2:)
!        INTEGER, POINTER :: func2(*)
!        INTEGER, POINTER :: func2(:)
!R505.13
!if the PARAMETER attribute is specified , it cannot be a dummy ,pointer,allocable array , function name or in common block
	INTEGER , PARAMETER :: dum2=10
!R505.16
!when an object in common block , a dummy , result , cannot specify the SAVE
	COMMON /COM/B,C
	INTEGER , SAVE :: B
	INTEGER , SAVE :: dum3
	INTEGER , SAVE :: resu
END FUNCTION

MODULE amod
!R505.15
!cannot have both  PRIVATE and PUBLIC attributes
	INTEGER , PRIVATE ,PUBLIC :: VAR3
end module
