Silverfrost Forums

Welcome to our forums

Garbage returned by clearwin_string@('CURRENT_MENU_ITEM')

17 Oct 2012 6:03 #10855

Hi, I have been trying (unsuccessfully) to use clearwin_string@('CURRENT_MENU_ITEM') but it returns garbage when I try to find out which menu item has been selected.

The code that creates the entries is:

**character(len=129) :: legenda type (bcdesc), pointer :: q

n_itens_cf_espec = 0 q ⇒ bclist do while (associated(q)) n_itens_cf_espec = n_itens_cf_espec+1 write(legenda,'(I3,' : fronteira ',A1,', variavel ',A1)')n_itens_cf_espec,q%boundary,q%boundary_variable call add_menu_item@(handle_menu_cf_espec,legenda,1,0,altera_cf_espec)**

where handle_menu_cf_spec is an integer declared on a module which is used by appropriate subprograms.

The code that checks for the menu item is just

** character(len=129) :: item

    item = ' '
item = clearwin_string@('CURRENT_MENU_ITEM')**

I am using FTN95 6.30 under Windows 7... any ideas?

17 Oct 2012 7:22 #10856

Did some more testing, and found out that if I take the subroutine/functions where those two pieces of code are out of the MODULE, and treat them as external subprograms, then every thing works as expected!!!

Surely some sort of bug in the compiler...

Cheers, Rudnei

17 Oct 2012 7:32 #10857

Ah, salflibc.dll version is 14.5.14.22

Please login to reply.