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 

Error in CHECKMATE but not in RELEASE

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



Joined: 13 Oct 2014
Posts: 624
Location: Morrison, CO, USA

PostPosted: Fri Aug 02, 2019 8:32 pm    Post subject: Error in CHECKMATE but not in RELEASE Reply with quote

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
View user's profile Send private message Visit poster's website
DanRRight



Joined: 10 Mar 2008
Posts: 2070
Location: South Pole, Antarctica

PostPosted: Sat Aug 03, 2019 3:21 am    Post subject: Reply with quote

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
View user's profile Send private message
mecej4



Joined: 31 Oct 2006
Posts: 1191

PostPosted: Sat Aug 03, 2019 3:56 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulLaidler
Site Admin


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

PostPosted: Sat Aug 03, 2019 7:25 am    Post subject: Reply with quote

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
View user's profile Send private message
DanRRight



Joined: 10 Mar 2008
Posts: 2070
Location: South Pole, Antarctica

PostPosted: Sat Aug 03, 2019 8:11 pm    Post subject: Reply with quote

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



Joined: 30 Jul 2013
Posts: 1203
Location: Aerospace Valley

PostPosted: Sun Aug 04, 2019 12:36 am    Post subject: Reply with quote

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 ... Smile "
Back to top
View user's profile Send private message
wahorger



Joined: 13 Oct 2014
Posts: 624
Location: Morrison, CO, USA

PostPosted: Sun Aug 04, 2019 2:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
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