Robin Imrie wrote:
all of a sudden the IsTypeA() function was getting called first
Thats a good reason for changing the code to
bool bConnected = unit.Connected();
bool bIsTypeA = unit.IsTypeA();
if ( !bConnected || !bIsTypeA )
{
PinrFailMessage( "Failed to connect" );
}
This will ensure that the call to Connected is always made first, regardless of what type is used for the return value. :)
Chris Meech I am Canadian. [heard in a local bar] In theory there is no difference between theory and practice. In practice there is. [Yogi Berra] posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]