View previous topic :: View next topic |
Author |
Message |
Sedgley
Joined: 09 Jun 2022 Posts: 13
|
Posted: Thu Jun 09, 2022 11:10 am Post subject: Character substring problem |
|
|
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 |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Thu Jun 09, 2022 11:28 am Post subject: |
|
|
Sedgley
Please provide the FTN95 version number and the FTN95 command line arguments that you are using. |
|
Back to top |
|
|
Sedgley
Joined: 09 Jun 2022 Posts: 13
|
Posted: Thu Jun 09, 2022 11:36 am Post subject: |
|
|
The FTN95 version number is 8.80.0
Command line arguments /CHECK /UNDEF |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
|
Back to top |
|
|
Sedgley
Joined: 09 Jun 2022 Posts: 13
|
Posted: Thu Jun 09, 2022 3:46 pm Post subject: |
|
|
Thanks.
I've download v8.84 but using it gives the same run-time error. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 8011 Location: Salford, UK
|
Posted: Thu Jun 09, 2022 4:32 pm Post subject: |
|
|
My apologies. The missing routine will be in the updated salflibc.dll which you can download from the same place. |
|
Back to top |
|
|
Sedgley
Joined: 09 Jun 2022 Posts: 13
|
Posted: Thu Jun 09, 2022 5:07 pm Post subject: |
|
|
Great. That's solved it.
Thank you |
|
Back to top |
|
|
JohnCampbell
Joined: 16 Feb 2006 Posts: 2580 Location: Sydney
|
Posted: Fri Jun 10, 2022 3:48 am Post subject: |
|
|
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 |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1896
|
Posted: Fri Jun 10, 2022 8:31 am Post subject: |
|
|
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 |
|
|
Sedgley
Joined: 09 Jun 2022 Posts: 13
|
Posted: Fri Jun 10, 2022 9:51 am Post subject: |
|
|
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 |
|
|
|