View previous topic :: View next topic |
Author |
Message |
dallimor
Joined: 14 Sep 2004 Posts: 1
|
Posted: Tue Sep 14, 2004 6:08 pm Post subject: TYPES with same variable name |
|
|
I've just downloaded ftn95 for evaluation and I'm gettiing an error when multiple defined types have components with the same variable name. The following example show the problem
Code: | PROGRAM SalfordTypesTestCase
IMPLICIT NONE
INTEGER, PARAMETER :: LINE_LEN = 80
TYPE test1
CHARACTER(LINE_LEN), DIMENSION(, POINTER :: variableName => NULL()
END TYPE test1
TYPE test2
CHARACTER(LINE_LEN) :: variableName = ' '
END TYPE test2
END PROGRAM SalfordTypesTestCase |
This code produces the following error
0012) CHARACTER(LINE_LEN) :: variableName = ' '
*** POINTER variables cannot be initialised
*** ''' found after variablename where a comma was expected
2 ERRORS [<SALFORDTYPESTESTCASE> FTN95/Win32 v4.6.0]
*** Compilation failed
If the two components variableName are both pointers or both just characters or they have different names then the code compiles.
Hope someone can help
Chris Dallimore |
|
Back to top |
|
|
silverfrost Site Admin
Joined: 29 Nov 2006 Posts: 191 Location: Manchester
|
Posted: Thu Sep 16, 2004 11:24 am Post subject: TYPES with same variable name |
|
|
Looks like a bug. It been forwarded to the appropriate developer.
Thanks for reporting this.
------------
Administrator
Silverfrost Forums |
|
Back to top |
|
|
|