Exemple #1
0
 private static VarType Check(VarType p1, VarType p2)
 {
     if (VarType.Numeric(p1) && VarType.Numeric(p2))
     {
         return(p2);
     }
     else if (p1 == VarType.BOOL && p2 == VarType.BOOL)
     {
         return(p2);
     }
     else
     {
         return(null);
     }
 }
Exemple #2
0
 private static VarType Check(VarType p1, VarType p2)
 {
     if (p1 is Array || p2 is Array)
     {
         return(null);
     }
     else if (p1 == p2)
     {
         return(p2);
     }
     else if (VarType.Numeric(p1) && VarType.Numeric(p2))
     {
         return(p2);
     }
     else
     {
         return(null);
     }
 }