Module file ftn95\sources64\clrwin.f95 of Salford ftn95, version 8.30 contains subroutines add_menu_item$ and remove_menu_item$ which have menu parameters of different types. The corresponding code in clrwin.f95 is
interface
subroutine remove_menu_item$(menu) bind(C,Name='__remove_menu_item')
use ISO_C_BINDING
integer(C_INT),value::menu
end subroutine remove_menu_item$
end interface
and
subroutine add_menu_item$(menu,name,grey_control,check_control,callback)
use ISO_C_BINDING
integer(C_LONG_LONG)::menu
character(len=*)::name
integer(C_INT)::grey_control,check_control
procedure(clrwin_cb$)::callback
interface
subroutine add_menu_item$$(menu,name,grey_control,check_control,callback) bind(C,Name='__add_menu_item')
use ISO_C_BINDING
integer(C_LONG_LONG),value::menu
character(C_CHAR)::name(*)
integer(C_INT)::grey_control,check_control
type(C_FUNPTR),value::callback
end subroutine add_menu_item$$
end interface
call add_menu_item$$(menu,trim(name)//C_NULL_CHAR,grey_control,check_control,C_FUNLOC(callback))
end subroutine add_menu_item$
When compiling an application using both subroutines by means of Salford's ftn95 64 bit, the menu parameters of both subroutines are of type INTEGER*8 which I would expect. When I try to compile the same application with INTEL 64 bit compiler ifort, then a warning is generated for the menu parameter of remove_menu_item$, more precisely the following one: The data type of the actual argument does not match the definition. [HANDLE] Hence, should the menu parameter
integer(C_INT),value::menu
of remove_menu_item$ not be substituted by
integer(C_LONG_LONG),value::menu
? The same would apply for some other menu routines in file clrwin.95 (delete_menu_item$ etc.).
We use file clrwin.f95 when compiling a 64 bit version of a 32 bit GUI application by means of INTEL ifort and Salford's clearwin64.dll..
Regards, Dietmar