Skip to content

Commit c347c94

Browse files
committed
修改 注释
1 parent accc96e commit c347c94

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

csharp/ToolGood.Algorithm2/AlgorithmEngineEx.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ public class AlgorithmEngineEx
3939
/// <summary>
4040
/// 跳过条件错误
4141
/// </summary>
42-
public bool JumpConditionError { get; set; }
42+
public bool JumpConditionError { get; set; } = true;
4343
/// <summary>
4444
/// 跳过公式错误
4545
/// </summary>
46-
public bool JumpFormulaError { get; set; }
46+
public bool JumpFormulaError { get; set; } = false;
4747
private readonly Dictionary<string, Operand> _tempdict;
4848

4949

@@ -809,9 +809,12 @@ public virtual String EvaluateFormula(String formula, List<char> splitChars)
809809
/// </summary>
810810
/// <param name="exp"></param>
811811
/// <returns></returns>
812-
protected Operand EvaluateOnce(string exp)
812+
public Operand EvaluateOnce(string exp)
813813
{
814814
ProgContext context = Parse(exp);
815+
if (context == null) {
816+
return Operand.Create(LastError);
817+
}
815818
return Evaluate(context);
816819
}
817820

csharp/ToolGood.Algorithm2/Internals/CharUtil.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace ToolGood.Algorithm.Internals
66
{
7-
internal class CharUtil
7+
class CharUtil
88
{
99
public static char StandardChar(char c)
1010
{

csharp/ToolGood.Algorithm2/MathNet/Constants.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/// <summary>
44
/// 常量
55
/// </summary>
6-
public static class Constants
6+
static class Constants
77
{
88
#region Mathematical Constants
99

@@ -15,14 +15,14 @@ public static class Constants
1515

1616
/// <summary>The number sqrt(2pi)</summary>
1717
public const double Sqrt2Pi = 2.5066282746310005024157652848110452530069867406099d;
18-
18+
1919
/// <summary>The number log(2 * sqrt(e / pi))</summary>
2020
public const double LogTwoSqrtEOverPi = 0.6207822376352452223455184457816472122518527279025978;
2121

2222
/// <summary>The number 2 * sqrt(e / pi)</summary>
2323
public const double TwoSqrtEOverPi = 1.8603827342052657173362492472666631120594218414085755;
2424

25-
25+
2626

2727

2828
#endregion

0 commit comments

Comments
 (0)