replica nfl jerseysreplica nfl jerseyssoccer jerseyreplica nfl jerseys forums.silverfrost.com :: View topic - Allocating an array incorrectly
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 

Allocating an array incorrectly

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



Joined: 05 Jul 2006
Posts: 299

PostPosted: Mon Sep 26, 2011 7:08 pm    Post subject: Allocating an array incorrectly Reply with quote

The following program assigns an array, but with too few dimensions. The program prints a 1 and then some nonsense number depending upon the compiler options. (If the array is declared in a module and compiled using only /LGO, the program will print two 1s.) It would be helpful if the compiler could pick this up as a programming error, which I assume it is.

Code:
PROGRAM p
  INTEGER, ALLOCATABLE :: i(:,:)
  ALLOCATE (i(1))
  PRINT*, SHAPE(i)
END PROGRAM p
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Tue Sep 27, 2011 7:08 am    Post subject: Reply with quote

I have logged this for investigation.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 8210
Location: Salford, UK

PostPosted: Thu Feb 23, 2012 3:27 pm    Post subject: Reply with quote

I have fixed this omission for the next release of FTN95.
Back to top
View user's profile Send private message AIM Address
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