soccer jersey forums.silverfrost.com :: View topic - Character substring problem
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 

Character substring problem

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



Joined: 09 Jun 2022
Posts: 13

PostPosted: Thu Jun 09, 2022 11:10 am    Post subject: Character substring problem Reply with quote

I am just beginning to port some programs from FTN77 to FTN95 and have come across a problem. The following example is similar to the one given on p162 of the User's Guide.

CHARACTER FLTNO*6,AIRLN*2
INTEGER*4 LA
FLTNO = 'BA 748'
LA = 2
AIRLN = FLTNO(1:LA)
END

With FTN77 this compiles and runs without a problem, assigning the value BA to AIRLN. With FTN95 it compiles but a run-time error occurs at the AIRLN = ... line, with the following message ...

Error 29: Call to missing routine : _CHECK_S_BOUND# at 0x00401059

Can someone please explain what is happening here?
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jun 09, 2022 11:28 am    Post subject: Reply with quote

Sedgley

Please provide the FTN95 version number and the FTN95 command line arguments that you are using.
Back to top
View user's profile Send private message AIM Address
Sedgley



Joined: 09 Jun 2022
Posts: 13

PostPosted: Thu Jun 09, 2022 11:36 am    Post subject: Reply with quote

The FTN95 version number is 8.80.0
Command line arguments /CHECK /UNDEF
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jun 09, 2022 1:44 pm    Post subject: Reply with quote

Your program works OK for me so please try v8.84 available for download from http://forums.silverfrost.com/viewtopic.php?t=4245.
Back to top
View user's profile Send private message AIM Address
Sedgley



Joined: 09 Jun 2022
Posts: 13

PostPosted: Thu Jun 09, 2022 3:46 pm    Post subject: Reply with quote

Thanks.
I've download v8.84 but using it gives the same run-time error.
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Thu Jun 09, 2022 4:32 pm    Post subject: Reply with quote

My apologies. The missing routine will be in the updated salflibc.dll which you can download from the same place.
Back to top
View user's profile Send private message AIM Address
Sedgley



Joined: 09 Jun 2022
Posts: 13

PostPosted: Thu Jun 09, 2022 5:07 pm    Post subject: Reply with quote

Great. That's solved it.
Thank you Smile
Back to top
View user's profile Send private message
JohnCampbell



Joined: 16 Feb 2006
Posts: 2580
Location: Sydney

PostPosted: Fri Jun 10, 2022 3:48 am    Post subject: Reply with quote

I am puzzled, as I am using version 8.80.0 but can not reproduce the problem.

I also tried the following, to see if the unused AIRLN might have been removed, but both options work ok

Code:
CHARACTER FLTNO*6,AIRLN*2
INTEGER*4 LA
FLTNO = 'BA 748'
LA = 2
AIRLN = FLTNO(1:LA)
write (*,*) fltno
write (*,*) airln
END


With "FTN95 airln.f90 /check /undef /link /map" CHECK_S_BOUNDS# is in the load map ?
Code:
Address   Name                                     File in which defined
 
Code

00401000    MAIN#                                    c:\temp\forum\lgotemp@.obj
                                                        (C:\TEMP\FORUM\AIRLN.F90)
00401000    main                                     c:\temp\forum\lgotemp@.obj
                                                        (C:\TEMP\FORUM\AIRLN.F90)
00401160    SALFStartup                              c:\Program Files (x86)\Silverfrost\ftn95_8.80F\salflibc.lib (/0             )
                                                        (\cpplib\nt_dll\salfstar.obj)
0040116a    SALFStart                                c:\Program Files (x86)\Silverfrost\ftn95_8.80F\salflibc.lib (/0             )
                                                        (\cpplib\nt_dll\salfstar.obj)
00401880    __undefined_function                     c:\Program Files (x86)\Silverfrost\ftn95_8.80F\salflibc.lib (salflibc.dll/  )
00401890    WSF1##                                   c:\Program Files (x86)\Silverfrost\ftn95_8.80F\salflibc.lib (salflibc.dll/  )
004018a0    CH#WSF                                   c:\Program Files (x86)\Silverfrost\ftn95_8.80F\salflibc.lib (salflibc.dll/  )
004018b0    CHECK_S_BOUNDS#                          c:\Program Files (x86)\Silverfrost\ftn95_8.80F\salflibc.lib (salflibc.dll/  )
004018c0    EXIT1#                                   c:\Program Files (x86)\Silverfrost\ftn95_8.80F\salflibc.lib (salflibc.dll/  )
0
Back to top
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1896

PostPosted: Fri Jun 10, 2022 8:31 am    Post subject: Reply with quote

The reference to the RTL routine CHECK_S_BOUNDS is generated by the compiler when options such as /undef are used. The routine itself is in one of the Silverfrost DLLs.

For a given compiler version such as 8.80, several different versions of the DLLs may have been released on different dates, and we do not know which DLL versions were used for the original post.


Last edited by mecej4 on Fri Jun 10, 2022 9:59 am; edited 1 time in total
Back to top
View user's profile Send private message
Sedgley



Joined: 09 Jun 2022
Posts: 13

PostPosted: Fri Jun 10, 2022 9:51 am    Post subject: Reply with quote

Thanks to everyone for the help. I discovered that there was an old version of SALFLIBC.DLL in the system path. Correcting this has solved the problem.
Mea Culpa.
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 -> General 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