@@ -815,7 +815,7 @@ public Operand VisitFIXED_fun(mathParser.FIXED_funContext context)
815815 var firstValue = args [ 0 ] . ToNumber ( "Function FIXED parameter 1 is error!" ) ;
816816 if ( firstValue . IsError ) { return firstValue ; }
817817
818- var s = Math . Round ( args [ 0 ] . NumberValue , num , MidpointRounding . AwayFromZero ) ;
818+ var s = Math . Round ( firstValue . NumberValue , num , MidpointRounding . AwayFromZero ) ;
819819 var no = false ;
820820 if ( args . Count == 3 ) {
821821 var thirdValue = args [ 2 ] . ToBoolean ( "Function FIXED parameter 3 is error!" ) ;
@@ -3323,18 +3323,18 @@ public Operand VisitLASTINDEXOF_fun(mathParser.LASTINDEXOF_funContext context)
33233323 var secondValue = args [ 1 ] . ToText ( "Function LASTINDEXOF parameter 2 is error!" ) ;
33243324 if ( secondValue . IsError ) { return secondValue ; }
33253325
3326- var text = args [ 0 ] . TextValue ;
3326+ var text = firstValue . TextValue ;
33273327 if ( args . Count == 2 ) {
3328- return Operand . Create ( text . LastIndexOf ( args [ 1 ] . TextValue ) + excelIndex ) ;
3328+ return Operand . Create ( text . LastIndexOf ( secondValue . TextValue ) + excelIndex ) ;
33293329 }
33303330 var thirdValue = args [ 2 ] . ToText ( "Function LASTINDEXOF parameter 3 is error!" ) ;
33313331 if ( thirdValue . IsError ) { return thirdValue ; }
33323332 if ( args . Count == 3 ) {
3333- return Operand . Create ( text . LastIndexOf ( args [ 1 ] . TextValue , args [ 2 ] . IntValue ) + excelIndex ) ;
3333+ return Operand . Create ( text . LastIndexOf ( secondValue . TextValue , thirdValue . IntValue ) + excelIndex ) ;
33343334 }
33353335 var fourthValue = args [ 3 ] . ToText ( "Function LASTINDEXOF parameter 4 is error!" ) ;
33363336 if ( fourthValue . IsError ) { return fourthValue ; }
3337- return Operand . Create ( text . LastIndexOf ( args [ 1 ] . TextValue , args [ 2 ] . IntValue , args [ 3 ] . IntValue ) + excelIndex ) ;
3337+ return Operand . Create ( text . LastIndexOf ( secondValue . TextValue , thirdValue . IntValue , fourthValue . IntValue ) + excelIndex ) ;
33383338 }
33393339 public Operand VisitSPLIT_fun ( mathParser . SPLIT_funContext context )
33403340 {
@@ -3405,7 +3405,7 @@ public Operand VisitSTARTSWITH_fun(mathParser.STARTSWITH_funContext context)
34053405 var secondValue = args [ 1 ] . ToText ( "Function STARTSWITH parameter 2 is error!" ) ;
34063406 if ( secondValue . IsError ) { return secondValue ; }
34073407
3408- var text = args [ 0 ] . TextValue ;
3408+ var text = firstValue . TextValue ;
34093409 if ( args . Count == 2 ) {
34103410 return Operand . Create ( text . StartsWith ( secondValue . TextValue ) ) ;
34113411 }
0 commit comments