Silverfrost Forums

Welcome to our forums

Ftn95 v8.60 - Compile time typing checking - clearwins.inc

17 Jan 2020 8:14 #24886

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

17 Jan 2020 8:40 #24888

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

17 Jan 2020 9:57 #24890

Paul

I missed the 'error 1244' post in clearwin forum

will await the next release

steve

17 Jan 2020 12:55 #24893

Steve,

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

https://forums.silverfrost.com/Forum/Topic/3677

where the hint is given to use option

/ignore 1244 

.

Regards, Dietmar

Please login to reply.