@@ -546,6 +546,8 @@ public override Operand Evaluate(AlgorithmEngine work, Func<AlgorithmEngine, str
546546 if ( args1 . NumberValue == 0m || args2 . NumberValue == 0m ) { return Operand . Zero ; }
547547 return Operand . Create ( args1 . NumberValue * args2 . NumberValue ) ;
548548 }
549+ if ( args1 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "*" , 1 ) ; }
550+ if ( args2 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "*" , 2 ) ; }
549551
550552 if ( args1 . IsText ) {
551553 if ( decimal . TryParse ( args1 . TextValue , NumberStyles . Any , CultureInfo . InvariantCulture , out decimal d ) ) {
@@ -618,6 +620,8 @@ public override Operand Evaluate(AlgorithmEngine work, Func<AlgorithmEngine, str
618620 if ( args2 . NumberValue == 0m ) { return Operand . Error ( "Div 0 is error!" ) ; }
619621 return Operand . Create ( args1 . NumberValue / args2 . NumberValue ) ;
620622 }
623+ if ( args1 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "/" , 1 ) ; }
624+ if ( args2 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "/" , 2 ) ; }
621625
622626 if ( args1 . IsText ) {
623627 if ( decimal . TryParse ( args1 . TextValue , NumberStyles . Any , CultureInfo . InvariantCulture , out decimal d ) ) {
@@ -678,6 +682,8 @@ public override Operand Evaluate(AlgorithmEngine work, Func<AlgorithmEngine, str
678682 if ( args2 . NumberValue == 0m ) { return Operand . Error ( "Div 0 is error!" ) ; }
679683 return Operand . Create ( args1 . NumberValue % args2 . NumberValue ) ;
680684 }
685+ if ( args1 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "%" , 1 ) ; }
686+ if ( args2 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "%" , 2 ) ; }
681687
682688 if ( args1 . IsText ) {
683689 if ( decimal . TryParse ( args1 . TextValue , NumberStyles . Any , CultureInfo . InvariantCulture , out decimal d ) ) {
@@ -738,6 +744,8 @@ public override Operand Evaluate(AlgorithmEngine work, Func<AlgorithmEngine, str
738744 if ( args2 . NumberValue == 0m ) { return args1 ; }
739745 return Operand . Create ( args1 . NumberValue + args2 . NumberValue ) ;
740746 }
747+ if ( args1 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "+" , 1 ) ; }
748+ if ( args2 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "+" , 2 ) ; }
741749
742750 if ( args1 . IsText ) {
743751 if ( decimal . TryParse ( args1 . TextValue , NumberStyles . Any , CultureInfo . InvariantCulture , out decimal d ) ) {
@@ -808,6 +816,8 @@ public override Operand Evaluate(AlgorithmEngine work, Func<AlgorithmEngine, str
808816 if ( args2 . NumberValue == 0m ) { return args1 ; }
809817 return Operand . Create ( args1 . NumberValue - args2 . NumberValue ) ;
810818 }
819+ if ( args1 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "-" , 1 ) ; }
820+ if ( args2 . IsNull ) { return Operand . Error ( "Function '{0}' parameter {1} is NULL!" , "-" , 2 ) ; }
811821
812822 if ( args1 . IsText ) {
813823 if ( decimal . TryParse ( args1 . TextValue , NumberStyles . Any , CultureInfo . InvariantCulture , out decimal d ) ) {
0 commit comments