Beispiel #1
0
 /// <summary>
 /// Transfering a list of strings to a list of token elements
 /// </summary>
 /// <param name="ListS"> list of strings </param>
 /// <returns> list of token elements </returns>
 static List<Element> StringsToElements(List<string> ListS)
 {
     List<Element> ListE = new List<Element>();
     foreach (string s in ListS)
     {
         Element n = new Element(s);
         switch (n.Type)
         {
             case C.Operation: n = new Operation(n); break;
             case C.Number: n = new Number(n); break;
             case C.Function: n = new FunctionElement(n); break;
             case C.Control: n = new Control(n); break;
         }
         ListE.Add(n);
     }
     return ListE;
 }
Beispiel #2
0
        Number N; // Argument

        #endregion Fields

        #region Constructors

        public FunctionExpression(FunctionElement f, Number n)
        {
            F = f; N = n;
        }