Exemplo n.º 1
0
 private static TCellFunctionData[] CreateIndexFunc()
 {
     TCellFunctionData[] Result = new TCellFunctionData[MaxFunctions];
     foreach (TCellFunctionData fd in Ht.Values)
     {
         Result[fd.Index] = fd;
     }
     return(Result);
 }
Exemplo n.º 2
0
        internal static TCellFunctionData GetData(int Index)
        {
            bool Found;
            TCellFunctionData Result = GetData(Index, out Found);

            if (!Found)
            {
                FlxMessages.ThrowException(FlxErr.ErrInvalidValue, "Function id", Index, 0, MaxFunctions - 1);
            }
            return(Result);
        }
Exemplo n.º 3
0
        protected override void AddParsedFunction(TCellFunctionData Func, byte ArgCount)
        {
            ptg FmlaPtg;

            if (Func.MinArgCount != Func.MaxArgCount || Func.FutureInXls)
            {
                FmlaPtg = GetRealPtg(ptg.FuncVar, Func.ReturnType);
            }
            else
            {
                FmlaPtg = GetRealPtg(ptg.Func, Func.ReturnType);
            }

            TBaseParsedToken FmlaToken = TParsedTokenListBuilder.GetParsedFormula(FmlaPtg, Func, ArgCount);

            Push(FmlaToken);
        }
Exemplo n.º 4
0
        internal static TCellFunctionData GetData(int Index, out bool Found)
        {
            if ((Index < 0) || (Index >= MaxFunctions))
            {
                Found = false;
                return(null);
            }

            TCellFunctionData Result = IndexFunc[Index];

            if (Result == null)
            {
                Found = false;
                return(null);
            }

            Found = true;
            return(Result);
        }
Exemplo n.º 5
0
 private static void Add(TCellFunctionDataDictionary Result, TCellFunctionData Func)
 {
     Result.Add(Func.Name, Func);
 }