Board index » cppbuilder » Exceptions, VCL, & FPU
Bruce Salzman
CBuilder Developer |
Exceptions, VCL, & FPU2005-05-10 04:08:08 AM cppbuilder60 Can anyone explain the behavior of this code? TDateTime date; WORD y1,m1,d1; WORD y2,m2,d2; _control87(MCW_EM, EM_ZERODIVIDE); // any exception mask will do date = EncodeDate(1999,1,1); DecodeDate(date, y1,m1,d1); try{ throw Exception("TEST"); } catch(Exception&){ } DecodeDate(date, y2,m2,d2); if (y1 != y2 || m1 != m2 || d1 != d2){ ::MessageBox(NULL, "Wrong date calculated.", "Date Error", MB_OK); } If the call to _control87() or the throw is removed, there is no problem. Regards, Bruce |