public static void main (String[] args) {

      ERROR_MESSAGES = false;
      // int input
      while (true) {
         System.out.println ("Enter an int");
         int i = KeyboardReader.readInt();  
         if (i == KeyboardReader.EOI_INT) {
            System.out.println ("EOI"); // swallowed!!?
            System.out.println ("EOI");
            break;
         }
         else if (i == KeyboardReader.ERROR_INT) {
            System.out.println ("ERROR");
            continue;
         }
         else 
            System.out.println (i + " entered");
      }

      // double input
      while (true) {
         System.out.println ("Enter a double");
         double d = KeyboardReader.readDouble();  
         if (d == KeyboardReader.EOI_DOUBLE) {
            System.out.println ("EOI"); // swallowed!!?
            System.out.println ("EOI");
            break;
         }
         else if (d == KeyboardReader.ERROR_DOUBLE) {
            System.out.println ("ERROR");
            continue;
         }
         else 
            System.out.println (d + " entered");
      }

      // String input
      while (true) {
         System.out.println ("Enter a String");
         String s = KeyboardReader.readString();  
         if (s == KeyboardReader.EOI_STRING) {
            System.out.println ("EOI");
            System.out.println ("EOI"); // swallowed!!?
            break;
         }
         else if (s == KeyboardReader.ERROR_STRING) {
            System.out.println ("ERROR");
            continue;
         }
         else 
            System.out.println (s + " entered");
      }
   }