#include #include "validate.h" #include "funcList.h" bool ValidateMultiply( const string& operation ) { if( operation != "multiply" ) return false; ln a, b, c, d; cin >> a >> b >> c; d = a * b; CheckForError( d, c, "operator*( ln )" ); d = a; d *= b; CheckForError( d, c, "operator*=( ln )" ); // scalar case... if( b.GetSize( ) == 1 ) { long bb = b.GetDigit( 0 ); if( b.GetSign( ) == negative ) bb = 0 - bb; d = a * bb; CheckForError( d, c, "operator*( scalar )" ); d = a; d *= bb; CheckForError( d, c, "operator*=( scalar )" ); } return true; } static TestFunctionList RegFunc( ValidateMultiply );