Silverfrost Forums

Welcome to our forums

TYPES with same variable name

14 Sep 2004 5:08 #60

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

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

  1. 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

16 Sep 2004 10:24 #61

Looks like a bug. It been forwarded to the appropriate developer.

Thanks for reporting this.


Administrator Silverfrost Forums


-- Admin Silverfrost Limited
Please login to reply.