Joined: 14 Sep 2004
|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
INTEGER, PARAMETER :: LINE_LEN = 80
CHARACTER(LINE_LEN), DIMENSION(, POINTER :: variableName => NULL()
END TYPE test1
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