private bool GetFunction(out TParserFunc AValue) { string TmpStr; bool Result = false; AValue = TParserFunc.pfArcTan; if (IsLetter(FParseText[FCurPos])) { foreach (TParserFunc func in FuncNames.Keys) { TmpStr = FParseText.Substring(FCurPos, FuncNames[func].Length); if (TmpStr.CompareTo(FuncNames[func]) == 0) { AValue = func; if (FParseText[FCurPos + TmpStr.Length] == '(') { Result = true; FCurPos += TmpStr.Length; break; } } } //end foreach } //end if return(Result); }
private bool GetFunction(out TParserFunc AValue) { string TmpStr; bool Result = false; AValue = TParserFunc.pfArcTan; if (IsLetter(FParseText[FCurPos])) { foreach (TParserFunc func in FuncNames.Keys) { TmpStr = FParseText.Substring(FCurPos, FuncNames[func].Length); if (TmpStr.CompareTo(FuncNames[func]) == 0) { AValue = func; if (FParseText[FCurPos + TmpStr.Length] == '(') { Result = true; FCurPos += TmpStr.Length; break; } } }//end foreach }//end if return Result; }