예제 #1
0
 protected override double OverrideFunction(string[] parameters, XMParser xmParser, List <XArray> xarrs)
 {
     if (param)
     {
         double[] mparameters = new double[parameters.Length];
         for (int i = 0; i < parameters.Length; i++)
         {
             mparameters[i] = xmParser.GetDouble(parameters[i], 0, xarrs);
         }
         XArray array = new XArray(arrs[0], mparameters.Length);
         array.vars  = mparameters;
         array.level = 1;
         List <XArray> arrList = new List <XArray>();
         arrList.Add(array);
         return(xsParser.ParseReturnVariable(code, 1, arrList));
     }
     else
     {
         List <XArray> arrays = new List <XArray>();
         for (int i = 0; i < parameters.Length; i++)
         {
             int k = -1;
             for (int j = 0; j < xarrs.Count; j++)
             {
                 if (xarrs[j].name == parameters[i])
                 {
                     k = j;
                     break;
                 }
             }
             if (k != -1)
             {
                 arrays.Add(new XArray(arrs[i], xarrs[k].vars.Length));
                 arrays[arrays.Count - 1].vars  = xarrs[k].vars;
                 arrays[arrays.Count - 1].level = 1;
             }
         }
         return(xsParser.ParseReturnVariable(code, 1, arrays));
     }
 }
 protected override double OverrideFunction(string[] parameters, XMParser xmParser, List<XArray> xarrs)
 {
     if (param)
     {
         double[] mparameters = new double[parameters.Length];
         for (int i = 0; i < parameters.Length; i++)
             mparameters[i] = xmParser.GetDouble(parameters[i], 0, xarrs);
         XArray array = new XArray(arrs[0], mparameters.Length);
         array.vars = mparameters;
         array.level = 1;
         List<XArray> arrList = new List<XArray>();
         arrList.Add(array);
         return xsParser.ParseReturnVariable(code, 1, arrList);
     }
     else
     {
         List<XArray> arrays = new List<XArray>();
         for (int i = 0; i < parameters.Length; i++)
         {
             int k = -1;
             for (int j = 0; j < xarrs.Count; j++)
             {
                 if (xarrs[j].name == parameters[i])
                 {
                     k = j;
                     break;
                 }
             }
             if (k != -1)
             {
                 arrays.Add(new XArray(arrs[i], xarrs[k].vars.Length));
                 arrays[arrays.Count - 1].vars = xarrs[k].vars;
                 arrays[arrays.Count - 1].level = 1;
             }
         }
         return xsParser.ParseReturnVariable(code, 1, arrays);
     }
 }
 protected virtual double OverrideProperty(XArray arr)
 {
     return 0;
 }
 public double ProccessProperty(XArray arr, ref int index)
 {
     index += arr.name.Length + XSyntax.Arrow.Length + name.Length;
     return OverrideProperty(arr);
 }
예제 #5
0
 protected virtual double OverrideProperty(XArray arr)
 {
     return(0);
 }
예제 #6
0
 public double ProccessProperty(XArray arr, ref int index)
 {
     index += arr.name.Length + XSyntax.Arrow.Length + name.Length;
     return(OverrideProperty(arr));
 }