Skip to content

Commit 565f5d2

Browse files
author
linzhijun
committed
fix
1 parent 6df6421 commit 565f5d2

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

csharp/ToolGood.Algorithm/Internals/Functions/FunctionBase.value.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public Function_ERROR(FunctionBase func1) : base(func1)
6565

6666
public override Operand Evaluate(AlgorithmEngine work, Func<string, Operand> tempParameter)
6767
{
68-
var t = func1.Evaluate(work, tempParameter).TextValue;
69-
return Operand.Error(t);
68+
var args1 = func1.Evaluate(work, tempParameter); if (args1.IsNotText) { args1 = args1.ToText(); if (args1.IsError) return args1; }
69+
return Operand.Error(args1.TextValue);
7070
}
7171

7272
public override void ToString(StringBuilder stringBuilder, bool addBrackets)
@@ -136,7 +136,8 @@ public override Operand Evaluate(AlgorithmEngine work, Func<string, Operand> tem
136136
{
137137
var txt = name;
138138
if (string.IsNullOrEmpty(name)) {
139-
txt = func1.Evaluate(work, tempParameter).TextValue;
139+
var args1 = func1.Evaluate(work, tempParameter); if (args1.IsNotText) { args1 = args1.ToText(); if (args1.IsError) return args1; }
140+
txt = args1.TextValue;
140141
} else {
141142
txt = name;
142143
}

0 commit comments

Comments
 (0)