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 

ftn95 problem concatenating substrings of a string constant?

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



Joined: 03 Jun 2013
Posts: 279

PostPosted: Mon Apr 01, 2019 1:23 pm    Post subject: ftn95 problem concatenating substrings of a string constant? Reply with quote

I am trying to concatenate 2 substrings of a string constant using ftn95, version 8.30. For the ftn95 source file following, I created a 32 bit executable and a 64 bit executable. I am astonished that the results of the concatenation are different for the 32 bit and the 64 bit executable.

Code:

      CHARACTER*10 mystring10
      character*5 concatenate_string
      PARAMETER (mystring10='abcdefghij')
      concatenate_string=mystring10(1:2)//mystring10(5:7) !+ bad
      write(*,*) 'mystring10(1:2)=',mystring10(1:2)
      write(*,*) 'mystring10(5:7)=',mystring10(5:7)
      write(*,*) 'concatenate_string=',concatenate_string
      concatenate_string(1:2)=mystring10(1:2) !+ works
      concatenate_string(3:5)=mystring10(5:7) !+ works
      write(*,*) 'concatenate_string=',concatenate_string
      end


Output of the 32 bit version:
Code:

 mystring10(1:2)=ab
 mystring10(5:7)=efg
 concatenate_string=ab ab
 concatenate_string=abefg

output of the 64 bit version:
Code:

mystring10(1:2)=ab
 mystring10(5:7)=efg
 concatenate_string=abefg
 concatenate_string=abefg

I wonder if the 32 bit result is correct, because the result expected and produced by the 64 bit version (concatenate_string=abefg) is generated, as well, when compiling the source with INTEL 32 bit and INTEL 64 bit compiler.

Regards,
Dietmar
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Mon Apr 01, 2019 6:37 pm    Post subject: Reply with quote

Dietmar

I can confirm this failure and I have made a note that it needs fixing.
Back to top
View user's profile Send private message AIM Address
PaulLaidler
Site Admin


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

PostPosted: Tue Aug 20, 2019 9:54 am    Post subject: Reply with quote

This failure has now been fixed 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