case TASKSETUPTIME: case TASKWRAPUPTIME:
  boolean argTypesLegal() {    if ((numArgs[operation] != -1) && (numArgs[operation] != args.length))      return false;    switch (operation) {    case EQ:    case NE:      return argTypes[0].equals (argTypes[1]);    case LT:    case GT:    case LE:    case GE:      return ((argTypes[0].equals ("number") &&               argTypes[1].equals ("number")) ||              (argTypes[0].equals ("datetime") &&               argTypes[1].equals ("datetime")));    case AND:    case OR:      for (int i = 0; i < argTypes.length; i++)        if (! argTypes[i].equals ("boolean"))          return false;      return true;    case NOT:      return argTypes[0].equals ("boolean");    case PLUS:      return ((argTypes[0].equals ("number") &&               argTypes[1].equals ("number")) ||              (argTypes[0].equals ("number") &&               argTypes[1].equals ("datetime")) ||              (argTypes[0].equals ("datetime") &&               argTypes[1].equals ("number")));    case MINUS:      return ((argTypes[0].equals ("number") &&               argTypes[1].equals ("number")) ||              (argTypes[0].equals ("datetime") &&               argTypes[1].equals ("datetime")) ||              (argTypes[0].equals ("datetime") &&               argTypes[1].equals ("number")));    case TIMES:    case DIVIDE:    case MOD:      return (argTypes[0].equals ("number") &&              argTypes[1].equals ("number"));    case ABS:      return argTypes[0].equals ("number");    case IF:      return ((argTypes.length >= 2) &&              argTypes[0].equals ("boolean") &&              ((argTypes.length == 2) ||               argTypes[2].equals (argTypes[1])));    case MAX:    case MIN:      for (int i = 0; i < argTypes.length; i++)        if (! argTypes[i].equals ("number"))          return false;      return true;    case SUMOVER:      return (isList (argTypes[0]) &&              argTypes[1].equals ("string") &&              argTypes[2].equals ("number"));    case MAXOVER:    case MINOVER:      return (isList (argTypes[0]) &&              argTypes[1].equals ("string") &&              (argTypes[2].equals ("number") ||               argTypes[2].equals ("datetime")));    case MAPOVER:      return (isList (argTypes[0]) &&              argTypes[1].equals ("string"));    case LIST:      if (argTypes.length == 0)        return false;      for (int i = 1; i < argTypes.length; i++)        if (! argTypes[i].equals (argTypes[0]))          return false;      return true;    case PREVIOUSDELTA:      return (argTypes[0].equals ("resource"));    case DIST:      return ((argTypes[0].equals ("latlong") &&               argTypes[1].equals ("latlong")) ||              (argTypes[0].equals ("xy_coord") &&               argTypes[1].equals ("xy_coord")));    case LATLONG_OP:      return (argTypes[0].equals ("number") &&              argTypes[1].equals ("number"));    case XY_COORD_OP:      return (argTypes[0].equals ("number") &&              argTypes[1].equals ("number"));    case INTERVAL_OP:      return ((argTypes.length >= 2) &&              argTypes[0].equals ("datetime") &&              argTypes[1].equals ("datetime") &&              ((argTypes.length < 3) || argTypes[2].equals ("string")) &&              ((argTypes.length < 4) || argTypes[3].equals ("string")));    case STRING:    case GET:    case GLOBALGET:      return true;    case ENTRY:      return (isList (argTypes[0]) &&              argTypes[1].equals ("number"));    case MATENTRY:      return (argTypes[0].equals ("matrix") &&              argTypes[1].equals ("number") &&              argTypes[2].equals ("number"));    case BUSYTIME:      return (argTypes[0].equals ("resource") &&              argTypes[1].equals ("datetime") &&              argTypes[2].equals ("datetime"));    case HASVALUE:      return true;    case PREPTIME:      return argTypes[0].equals ("resource");    case COMPLETE:      return argTypes[0].equals ("resource");    case TASKSTARTTIME:    case TASKENDTIME:    case RESOURCEFOR:    case GROUPFOR:      return argTypes[0].equals ("task");    case TASKSFOR:      return argTypes[0].equals ("resource");    case FIND:      return (isList (argTypes[0]) &&              argTypes[1].equals ("string") &&              argTypes[2].equals ("boolean"));    case APPEND:      return ((argTypes[0].equals (argTypes[1])) &&              ((isList (argTypes[0]) || argTypes[0].equals ("string"))));    case ANDOVER:    case OROVER:      return (isList (argTypes[0]) &&              argTypes[1].equals ("string") &&              argTypes[2].equals ("boolean"));    case LOOP:      return (argTypes[0].equals ("number") &&              argTypes[1].equals ("string"));    case LENGTH:      return isList (argTypes[0]);    case POSITION:      return isList (argTypes[0]);    default:      System.out.println ("Unchecked operation " + opStrings[operation]);      return false;    }      }