LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Pow() function run-time error

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.

0 Kudos
Message 1 of 3
(3,322 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(3,320 Views)

you could use SetBreakOnLibraryErrors ( FALSE ), or (better) check the argument of the function before calling it.

 

...hm, too slow by few secondsSmiley Wink

0 Kudos
Message 3 of 3
(3,319 Views)