View previous topic :: View next topic |
Author |
Message |
steveDoyle
Joined: 04 Sep 2009 Posts: 108 Location: Manchester
|
Posted: Fri Jan 17, 2020 9:14 am Post subject: Ftn95 v8.60 - Compile time typing checking - clearwins.inc |
|
|
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 |
|
|
steveDoyle
Joined: 04 Sep 2009 Posts: 108 Location: Manchester
|
Posted: Fri Jan 17, 2020 9:40 am Post subject: Ftn95 v8.60 - Compile time typing checking - clearwins.inc |
|
|
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 |
|
|
steveDoyle
Joined: 04 Sep 2009 Posts: 108 Location: Manchester
|
Posted: Fri Jan 17, 2020 10:57 am Post subject: |
|
|
Paul
I missed the "error 1244" post in clearwin forum
will await the next release
steve |
|
Back to top |
|
|
DietmarSiepmann
Joined: 03 Jun 2013 Posts: 279
|
|
Back to top |
|
|
|