@@ -24,6 +24,7 @@ ToolGood.Algorithm supports `Four arithmetic`, `Excel formula`, and supports `Cu
2424 }
2525 double b = engine. TryEvaluate (" 1=1 && 1<2 and 7-8>1" , 0.0 );// 支持 && || and or
2626 double c = engine. TryEvaluate (" 2+3" , 0 );
27+ double q = engine. TryEvaluate (" -7 < -2 ?1 : 2" , 0 );
2728 double d = engine. TryEvaluate (" count(array(1,2,3,4))" , 0.0 );// {}代表数组,返回:4
2829 String s = engine. TryEvaluate (" 'aa'&'bb'" , " " ); // 字符串连接,返回:aabb
2930 int r = engine. TryEvaluate (" (1=1)*9+2" , 0 ); // 返回:11
@@ -119,6 +120,19 @@ Note: You can also use `AddParameter`, `AddParameterFromJson` to add methods, an
119120```
120121See unit testing for more features.
121122
123+ ## Custom parameters
124+ ``` csharp
125+ var helper = new ToolGood .Algorithm .AlgorithmEngineHelper ();
126+ helper .IsKeywords (" false" ); // return true
127+ helper .IsKeywords (" true" ); // return true
128+ helper .IsKeywords (" mysql" ); // return false
129+
130+ DiyNameInfo p5 = helper .GetDiyNames (" ddd(d1,22)" );
131+ Assert .AreEqual (" ddd" , p5 .Functions [0 ]);
132+ Assert .AreEqual (" d1" , p5 .Parameters [0 ]);
133+
134+ ```
135+
122136## Excel Formula
123137
124138Functions: ` logical functions ` , ` mathematics and trigonometric functions ` , ` text functions ` , ` statistical functions ` , ` date and time functions `
0 commit comments