PRODUCT : Borland C++ NUMBER : 1745 VERSION : All OS : OS/2 DATE : December 8, 1993 PAGE : 1/1 TITLE : Fix for signal function example The example for the "signal" function does not compile using the default compiler settings. You will receive a "cannot convert" message. The following is corrected version of the example: /* This example installs a signal routine to be run when Ctrl-Break is pressed */ #include #include #include void catcher(void) { printf("\nNow in break routine\n"); exit(1); } int main(void) { // The original line: signal(SIGINT, catcher); // should be changed to the following line. signal(SIGFPE, (void (cdecl *)(int))catcher); for (;;) printf("\nIn main() program\n"); } There are two other methods to resolve this problem. The first is, set the compiler for "C" Calling convention rather than "Standard". This is in Project|View Settings|Compiler|Code Generation. The second way would be to declare the catcher function as: void cdecl catcher(int x) { ... } Any of the above three methods will resolve the problem. DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.