forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TYPES with same variable name

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support
View previous topic :: View next topic  
Author Message
dallimor



Joined: 14 Sep 2004
Posts: 1

PostPosted: Tue Sep 14, 2004 6:08 pm    Post subject: TYPES with same variable name Reply with quote

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(Smile, 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
View user's profile Send private message
silverfrost
Site Admin


Joined: 29 Nov 2006
Posts: 158
Location: Manchester

PostPosted: Thu Sep 16, 2004 11:24 am    Post subject: TYPES with same variable name Reply with quote

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

Thanks for reporting this.

------------
Administrator
Silverfrost Forums
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> Support All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group