INTERRUPT during CONSTRUCT: workaround
Posted in 1993
A looong time ago I had seen some discussion about the bug no 15976, hitting the INTERRUPT key in the middle of a CONSTRUCT statement. Well, I got hit by the bug and was forced to find a work around. In my situation, I open a window with a form, run a construct and then run a menu before closing the window, all in a single function. I thought I would share the workaround if someone is still looking for it. This workaround is different from the one suggested by June Tong. I use the "ON KEY (INTERRUPT)" clause to trap the interrupt key and basically exit one layer of looping and that seems to take care of the bug. I use while loops and the structure of the code looks something like - ------------------------------------------------------------------------------- function XXX open window XXX with form XXX... while true construct by name select_str on XXX, XXX ... on key (INTERRUPT) exit while exit exit construct end construct ....some other I/O, menus, etc exit while end while if ((int_flag = true) or (quit_flag = true)) then ..whatever.. end if close window XXX end function ------------------------------------------------------------------------------- INFORMIX-SE Version 5.00.UD1 INFORMIX-4GL Version 4.10.UE2 Apparently, the place to which control is transferred matters in this case. Comments welcome. regards, ------------------------------------------------------------------------------- Atul Patankar | Is coding really my Karma? email: apatanka@magnus.acs.ohio-state.edu | Phone (W): (614) 575 6652 | All Disclaimers Apply -------------------------------------------------------------------------------