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 v8.60 - Compile time typing checking - clearwins.inc

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



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Fri Jan 17, 2020 9:14 am    Post subject: Ftn95 v8.60 - Compile time typing checking - clearwins.inc Reply with quote

HI I have just recomplied stable code with V8.60 and and getting error 1244 message("...is passed as a reference that should not be a constant nor an expression") for my clearwin calls

c fails to compile with 1244 message for arguments 2 & 3
SUBROUTINE GET_OS_VERSION(DESCRIPT, MAJOR_ID, MINOR_ID)
c ========================
IMPLICIT NONE

INCLUDE <WINDOWS.INS>
CHARACTER*( * ) DESCRIPT
INTEGER MAJOR_ID, MINOR_ID

CALL GET_WOW_VER@(DESCRIPT, MAJOR_ID, MINOR_ID)
END

c compiles with no messages

SUBROUTINE GET_OS_VERSION(DESCRIPT, MAJOR_ID, MINOR_ID)
c ========================
IMPLICIT NONE

INCLUDE <WINDOWS.INS>
CHARACTER*( * ) DESCRIPT
INTEGER MAJOR_ID, MINOR_ID, MAJOR_ID_x, MINOR_ID_x


CALL GET_WOW_VER@(DESCRIPT, MAJOR_ID_x, MINOR_ID_x)
MAJOR_ID = MAJOR_ID_x
MINOR_ID = MINOR_ID_x
END

I can use this workaround for most of my clearwin calls but how do i handle the situation where i am passing a function reference

SUBROUTINE SET_CWP_FOCUS_MONITOR(IMODE, STM_FOCUS)
c ================================
IMPLICIT NONE
INCLUDE <WINDOWS.INs>
INTEGER IMODE
INTEGER STM_FOCUS
EXTERNAL STM_FOCUS
IF (IMODE .EQ. 0) THEN
CALL ADD_FOCUS_MONITOR@(STM_FOCUS)
ELSE
CALL REMOVE_FOCUS_MONITOR@(STM_FOCUS)
ENDIF
END

in all of these example i am only passing reference so there should not be an issue or am i missing something simple
steve
Back to top
View user's profile Send private message
steveDoyle



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Fri Jan 17, 2020 9:40 am    Post subject: Ftn95 v8.60 - Compile time typing checking - clearwins.inc Reply with quote

HI
just a follow up to my previous post

if change the definition in clearwin.ins from

C_EXTERNAL ADD_FOCUS_MONITOR@ '__add_focus_monitor'(REFF)
to

C_EXTERNAL ADD_FOCUS_MONITOR@ '__add_focus_monitor' (REF)

the error message disappears

Am i safe to assume that the new argument descriptors (reff, ref2,val3 etc.) are used to help the compiler identify possible issues but the older type (ref, val etc.) will still work but without the type checking

the clearwin routines i that were giving errors were
GET_GRAPHICAL_RESOLUTION@
GET_GRAPHICS_SELECTED_AREA@
GET_CURRENT_DC@
GET_WOW_VER@
ADD_FOCUS_MONITOR@
REMOVE_FOCUS_MONITOR@
ADD_ACCELERATOR@

thanks

steve
Back to top
View user's profile Send private message
steveDoyle



Joined: 04 Sep 2009
Posts: 108
Location: Manchester

PostPosted: Fri Jan 17, 2020 10:57 am    Post subject: Reply with quote

Paul

I missed the "error 1244" post in clearwin forum

will await the next release

steve
Back to top
View user's profile Send private message
DietmarSiepmann



Joined: 03 Jun 2013
Posts: 279

PostPosted: Fri Jan 17, 2020 1:55 pm    Post subject: Reply with quote

Steve,

you might want to look at request "Compiler error GET_IM_INFO@", 64-Bit forum

http://forums.silverfrost.com/viewtopic.php?t=4136

where the hint is given to use option
Code:

/ignore 1244
.

Regards,
Dietmar
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 -> 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