- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have composed a code(below) using CVF 6.5A(Intel Windows NT 4.0)
At compiling, several error messages were printed.
But could not find out, the problems.
Is there anyone to help me ?
Thanks.
*** source code ***
module Common
type T_Type0
real*8, pointer :: Coef(:)
integer*4, pointer :: Indx(:)
end type
type T_Type1
type (T_Type0), pointer :: Type1(:)
end type
type T_Type2
type (T_Type1) :: Type2
end type
type (T_Type2) :: Type3
end module
use Common
implicit real*8 (a-h, o-z), integer*4 (i-n)
if(not(associated(Type3.Type2.Type1))) &
allocate(Type3.Type2.Type1(10))
if(not(associated(Type3.Type2.Type1(1).Indx))) &
allocate(Type3.Type2.Type1(1).Indx(100))
do i = 1, 100
Type3.Type2.Type1(1).Indx(i) = i
write(*,*) i, Type3.Type2.Type1(1).Indx(i)
end do
stop
end
*** error message ***
Compaq Visual Fortran Optimizing Compiler Version 6.5 (Update A)
Copyright 2001 Compaq Computer Corp. All rights reserved.
dum.f90
dum.f90(25) : Error: Syntax error, found '.' when expecting one of: ( , )
allocate(Type3.Type2.Type1(10))
-----------------------------^
dum.f90(28) : Error: Syntax error, found '.' when expecting one of: ( , )
allocate(Type3.Type2.Type1(1).Indx(100))
-----------------------------^
dum.f90(25) : Error: An allocate/deallocate object must have the ALLOCATABLE or
POINTER attribute. [TYPE2]
allocate(Type3.Type2.Type1(10))
------------------------^
dum.f90(25) : Error: An allocate-shape-spec-list is required for this allocate o
bject. [TYPE2]
allocate(Type3.Type2.Type1(10))
------------------------^
dum.f90(25) : Error: An allocate/deallocate object must have the ALLOCATABLE or
POINTER attribute. [TYPE1]
allocate(Type3.Type2.Type1(10))
------------------------------^
dum.f90(25) : Error: The rank of the allocate-shape-spec-list differs from the r
ank of the allocate-object. [TYPE1]
allocate(Type3.Type2.Type1(10))
------------------------------^
dum.f90(28) : Error: An allocate/deallocate object must have the ALLOCATABLE or
POINTER attribute. [TYPE2]
allocate(Type3.Type2.Type1(1).Indx(100))
------------------------^
dum.f90(28) : Error: An allocate-shape-spec-list is required for this allocate o
bject. [TYPE2]
allocate(Type3.Type2.Type1(1).Indx(100))
------------------------^
dum.f90(28) : Error: This name has not been declared as an array. [TYPE1]
allocate(Type3.Type2.Type1(1).Indx(100))
------------------------------^
At compiling, several error messages were printed.
But could not find out, the problems.
Is there anyone to help me ?
Thanks.
*** source code ***
module Common
type T_Type0
real*8, pointer :: Coef(:)
integer*4, pointer :: Indx(:)
end type
type T_Type1
type (T_Type0), pointer :: Type1(:)
end type
type T_Type2
type (T_Type1) :: Type2
end type
type (T_Type2) :: Type3
end module
use Common
implicit real*8 (a-h, o-z), integer*4 (i-n)
if(not(associated(Type3.Type2.Type1))) &
allocate(Type3.Type2.Type1(10))
if(not(associated(Type3.Type2.Type1(1).Indx))) &
allocate(Type3.Type2.Type1(1).Indx(100))
do i = 1, 100
Type3.Type2.Type1(1).Indx(i) = i
write(*,*) i, Type3.Type2.Type1(1).Indx(i)
end do
stop
end
*** error message ***
Compaq Visual Fortran Optimizing Compiler Version 6.5 (Update A)
Copyright 2001 Compaq Computer Corp. All rights reserved.
dum.f90
dum.f90(25) : Error: Syntax error, found '.' when expecting one of: ( , )
allocate(Type3.Type2.Type1(10))
-----------------------------^
dum.f90(28) : Error: Syntax error, found '.' when expecting one of: ( , )
allocate(Type3.Type2.Type1(1).Indx(100))
-----------------------------^
dum.f90(25) : Error: An allocate/deallocate object must have the ALLOCATABLE or
POINTER attribute. [TYPE2]
allocate(Type3.Type2.Type1(10))
------------------------^
dum.f90(25) : Error: An allocate-shape-spec-list is required for this allocate o
bject. [TYPE2]
allocate(Type3.Type2.Type1(10))
------------------------^
dum.f90(25) : Error: An allocate/deallocate object must have the ALLOCATABLE or
POINTER attribute. [TYPE1]
allocate(Type3.Type2.Type1(10))
------------------------------^
dum.f90(25) : Error: The rank of the allocate-shape-spec-list differs from the r
ank of the allocate-object. [TYPE1]
allocate(Type3.Type2.Type1(10))
------------------------------^
dum.f90(28) : Error: An allocate/deallocate object must have the ALLOCATABLE or
POINTER attribute. [TYPE2]
allocate(Type3.Type2.Type1(1).Indx(100))
------------------------^
dum.f90(28) : Error: An allocate-shape-spec-list is required for this allocate o
bject. [TYPE2]
allocate(Type3.Type2.Type1(1).Indx(100))
------------------------^
dum.f90(28) : Error: This name has not been declared as an array. [TYPE1]
allocate(Type3.Type2.Type1(1).Indx(100))
------------------------------^
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Replace the . component separators with the standard % - then it will compile. The dots should work - we'll look at that.
Please note that our free support address is vf-support@compaq.com I see that you asked here and in comp.lang.fortran, but not at our support address.
Steve
Please note that our free support address is vf-support@compaq.com I see that you asked here and in comp.lang.fortran, but not at our support address.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok !!
It works fine.
Thanks Steve.
It works fine.
Thanks Steve.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page