Hi,
smurph is one of the lead developers of Mach4 and a seasoned programmer. He has repeatedly suggested to all and sundry
that each and every API call return code be tested. I'm slack and only do so when I get into trouble but there are certain
API's where if you don't test the return code you ARE IN TROUBLE......you don't know when but it WILL BLOW UP IN YOUR FACE.
One such API is mc.CntlGcodeExecuteWait(). Another is mcSignalWait. Having being burnt I usually always test them,
I know it adds complexity to the code but it works and saves grief.
The only time I tend not to test them is if the extra (seeming) code complexity will obscure the program logic, particularly
if I'm posting on the forum for others benefit. In that situation clear concise code with minimal clutter conveys the most
understanding. Code that I develop for my own machine includes multiple test points.
Craig