public boolean invalid () {
    for (int i=0; i<args.length; i++) {
      String arg = args [i];

      if (arg.startsWith ("--")) // option
        if (arg.length () == 2) // end-option-mark
          break;

        else if (!valid_names.contains (arg))
          invalid_names.append (arg + ", ");
    }

    int n = invalid_names.length ();
    boolean any = n > 2;
    if (any) {
      invalid_names.delete (n-2, n); // delete last ", "
      System.out.println ("\nInvalid options: " + invalid_names);
      System.out.println ("Try --help for a list of valid options.");
    }

    invalid_names = null;       // help garbage collection
    valid_names = null;         // help garbage collection
    return any;
  }