|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Fri Aug 02, 2019 8:32 pm Post subject: Error in CHECKMATE but not in RELEASE |
|
|
The following code, when compiled with /CHECKMATE (DLL Rev 43) throws a CLEARWIN+ error of "A Variable for %bb has not been given an initial value", then asks if I want to continue. This does not occur using /RELEASE. Note that there is not a single %bb in the following code.
Code: | use mswin
character*4:: xcproj=' '
INTEGER:: I,J
integer:: sheet_displayed,enable_save
logical:: sheet_viewed(0:4)
integer,external:: sheet_started
common/sheet_temp/sheet_displayed,sheet_viewed,enable_save
integer,external:: button1,button2,r
integer,external:: ptract_generic,pcomp_generic
LOGICAL:: local_error
integer,external:: button_test
integer(7):: handle_1,handle_2,handle_3,handle_4
character*4:: priinv=' ',pbreg=' ',pupper=' ',plower=' ',pdate,prdesc(5)
local_error = .false.
! UPDPRJ_windows=.TRUE.
sheet_viewed = .false.
sheet_viewed(1) = .true.
if(xcproj.ne.' ') sheet_viewed = .true.
sheet_displayed = 1
i = winio@('%sh&',handle_1)
i = winio@('%ca[Principal Investigator and Bed codes]&')
i = winio@('%bg&',rgb@(250,250,250))
i = winio@('1. Principal Investigator: %rs[uppercase]%ff%nl&',priinv)
i = winio@('2. Bed Code Region: %rs[uppercase]%ff%nl&',pbreg)
i = winio@('3. Upper Bed Code: %rs[uppercase]%ff%nl&',pupper)
i = winio@('4. Lower Bed Code: %rs[uppercase]%ff%nl&',plower)
i = winio@(' ') ! close the previous sheet
print *,"Sheet 1 built"
! Sheet 2 - State, County, Township (20 OF EACH ELEMENT, SO USE %ob)
i = winio@('%sh&',handle_2)
i = winio@('%ca[State, County, Township]&')
i = winio@('%bg&',rgb@(250,250,250))
i = winio@('%*.*ob&',4,1) ! s/b 4,21
i = winio@('##%cbState%cbCounty%cbTownship%cb&')
i = winio@(' ') ! close the previous sheet
print *,"Sheet 2 built"
! Sheet 3 - Company, Tract, Mine (20 OF EACH ELEMENT, SO USE %ob; also, lots of buttons)
i = winio@('%sh&',handle_3)
i = winio@('%ca[Company, Tract, Mine]&')
i = winio@('%bg&',rgb@(250,250,250))
i = winio@('%*.*ob[line_colour]&',4,1,rgb@(0,255,0)) ! s/b 4,21
i = winio@('##%cbCompany%cbTract%cbMine%cb&')
i = winio@(' ') ! close the previous sheet
print *,"Sheet 3 built"
! Sheet 4 - Dates and Descriptions
i = winio@('%sh&',handle_4)
i = winio@('%ca[Dates and Descriptions]&')
i = winio@('%bg&',rgb@(250,250,250))
i = winio@('11. Date (mm/dd/yy): %rs[uppercase]%ff%nl&',pdate)
do i=1,5
j = winio@('%3wd: %rs[UPPERCASE]%nl&',i,prdesc(i))
end do
i = winio@(' ') ! close the previous sheet
print *,"Sheet 4 built"
if(xcproj.ne.' ') then
i = winio@('%ca[Enter/Edit Current Project Information for Project='//xcproj//']&')
else
i = winio@('%ca[Enter/Edit a New Project]&')
endif
i = winio@('%bfClick each of the TABS below to enter/edit the data, then click %~^bt[SAVE] or %^bt[CANCEL]%ff%nl&',enable_save,button1,button2)
i = winio@('%4ps[hot_track]',handle_1,handle_2,handle_3,handle_4)!`^,sheet_displayed,SHEET_STARTED)
! updprj_windows = i.eq.1 ! return code of 1 means all work was accepted
end
integer function button1()
button1 = 1
return
end
integer function button2()
button2 = 2
return
end
|
|
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2823 Location: South Pole, Antarctica
|
Posted: Sat Aug 03, 2019 3:21 am Post subject: |
|
|
Have no problem compiling. I'm lost which DLL version i have but this handy program (recommend to all to add to all your codes. Who was its author here?) tells that my
Library date is 4:53:46 - 27:6:2019
Library version 21 6 26 21
Code: |
Integer function LibraryVersion64()
C_EXTERNAL GetLibraryVersionInfo '_GetLibraryVersionInfo'():INTEGER(7)
C_EXTERNAL GetLibraryDateInfo '_GetLibraryDateInfo'():INTEGER(7)
C_EXTERNAL GetString 'GET_CSTRING@'(REF,VAL,REF)
CHARACTER(80) info,info2
call GetString(info, GetLibraryDateInfo(), 80)
print*,'Library Date: ', info
call GetString(info2, GetLibraryVersionInfo(), 80)
!Year since 1998, month, day, hour...
print*, 'Library Vers: ', info2
i=winio@('%ww%sv%ff Library date: %ta%22rs%ff Library version: %ta%22rs%ff %nl%cn%bt[OK]',info, info2)
LibraryVersion64 = 2
end function |
|
|
Back to top |
|
|
mecej4
Joined: 31 Oct 2006 Posts: 1886
|
Posted: Sat Aug 03, 2019 3:56 am Post subject: |
|
|
The current compiler, with the /64 /CHECK_WINIO options, says:
Code: | S:\LANG\FTN95>ftn95 /64 /check_winio wahbb.f90 /link
[FTN95/x64 Ver. 8.51.0 Copyright (c) Silverfrost Ltd 1993-2019]
0021) i = winio@('%sh&',handle_1)
*** Argument number 2 (HANDLE_1) of WINIO@ should be a 32 bit integer
|
I changed the type to INTEGER(3) and the program seemed to run fine. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7929 Location: Salford, UK
|
Posted: Sat Aug 03, 2019 7:25 am Post subject: |
|
|
Bill
The error report arises because enable_save has not been given an initial value. It should say %BT and I will look into that.
This illustrates a new diagnostic check that may not be apparent when using the latest public update of the DLLs. |
|
Back to top |
|
|
DanRRight
Joined: 10 Mar 2008 Posts: 2823 Location: South Pole, Antarctica
|
Posted: Sat Aug 03, 2019 8:11 pm Post subject: |
|
|
This demonstrates that Clearwin+ has to work consistently with /checkmate (or /undef) and do the same what the FTN95 is doing : track such variables too. It missed the uninitialized variable. You are lucky, I could not find one crashing Clearwin bug for 10 years with exactly the same property sheet like in this demo. I can not make small reproducer because the property sheet is initially 100x larger, and with smaller demo bug disappears |
|
Back to top |
|
|
John-Silver
Joined: 30 Jul 2013 Posts: 1520 Location: Aerospace Valley
|
Posted: Sun Aug 04, 2019 12:36 am Post subject: |
|
|
Paul wrote:
Quote: | This illustrates a new diagnostic check that may not be apparent when using the latest public update of the DLLs. |
.... which is ???? _________________ ''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... " |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sun Aug 04, 2019 2:55 pm Post subject: |
|
|
Paul, thanks for finding that. I'll correct my original code. As well as go through similar instances to make SURE I catch them before compilation.
This does bring up the information in the error message, like the line number or address at which the fault is found. I think there is another thread that addresses that concern.
Again, thanks!
Bill |
|
Back to top |
|
|
|
|
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
|