11-02-2010 05:10 AM
Hello,
I am using the pow() function and while testing my program, the Pow() function will register a non-fatal run-time error message which pops up with a box and I have to select "continue" each time. This is really annoying considering my program calls Pow() every few seconds!
So is there a way to stop pow() function from generating a run-time error while debugging!
I am using LabWindows/CVI 8.1
Thanks.
11-02-2010 05:26 AM
Hi Bravi,
pow () returns an error in very specific cases, listes in command online help.
In any case, sinceyou say it is a non-fatal error, you can skip the dialog box by unchecking Run >> Break on >> Library errors menu item. If you don't want this option to be disabled in the whole program you can locally disable it by using SetBreakOnLibraryErrors to disable it only around the part of code you want.
Nevertheless, it is advisable that error conditions are trapped and handled correctly to avoid unexpected behaviour in your program: getting pow () return code or testing errno global variable after the call to it can help you in determining if the function was successful or not.
11-02-2010 05:26 AM - edited 11-02-2010 05:27 AM
you could use SetBreakOnLibraryErrors ( FALSE ), or (better) check the argument of the function before calling it.
...hm, too slow by few seconds![]()