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 

weird result passing character array to subroutine

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





PostPosted: Tue Jun 19, 2007 4:19 pm    Post subject: weird result passing character array to subroutine Reply with quote

Imagine if you will the following simple bit of code

Code:
program test
character (len=80) :: array(25)
call sub(array)
end program test
subroutine sub(a)
character (len=*) :: a(*)
a(1) = 'abc'
return
end subroutine sub


Run it in the debugger. Step into sub. open the 'vars' window, if it's not already open. Notice that the dimension of a is shown as (*Invalid*). Why? What can be done to make it show the correct value? I don't care so much about the debugger, but because it's "wrong" the size intrinsic returns an incorrect value, which makes allocating similarly sized arrays "problematic".

This is version 5.01. Don't know if it happens with 5.1
Back to top
JohnCampbell



Joined: 16 Feb 2006
Posts: 2554
Location: Sydney

PostPosted: Wed Jun 20, 2007 3:48 am    Post subject: Reply with quote

Bruce,

FTN95 Version 4.9.1 provides the correct array dimension and size in the Vars window.

John
Back to top
View user's profile Send private message
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