long GPIBGetError (void);
// "40" is not a valid GPIB address GPIBDevChangePrimAddr(devDescr, 40); if ( ( 1 << 15) & GPIBGetStatus() ) { write("ERR bit set in status word"); if ( 4 == GPIBGetError() ) { write("error is EARG: Invalid argument to function call"); } }