01-22-2007 10:38 AM
01-22-2007 11:57 AM
I found the command:
int oldValue;
oldValue = SetBreakOnProtectionErrors (0);
/* Statement that erroneously reports an error */
SetBreakOnProtectionErrors (oldValue);
01-22-2007 12:47 PM
Oopps,
I did try over and it does not work when the size of array_X is less than the size of array_Y, sorry about my early successful comment ... it still displays the error (as attachment). SO if someone know better protection please help!
01-22-2007 01:13 PM
It is very embarassing, the first commands are good. To pay my mistakes here is the codes which working in my case:
/* Statement that erroneously reports an error */
i_bPrevBreak = SetBreakOnLibraryErrors (FALSE);
i_error = PolyFit (db_arrX, db_arrY, i_size, i_degree, db_arrOutput, db_arrRet, &mse);
SetBreakOnLibraryErrors (i_bPrevBreak);
if(i_error != 0)
{
sprintf(str, "Error nuber = %d", i_error);
MessagePopup ("SCI_LEASTSQUAREFIT ERROR", str);
return db_arrX;
}
*) Sometimes, it is just a bad day!