public static String yieldChoiceMenuString(Cons items, String selectoptions) {
    { OutputStringStream menu = OutputStringStream.newOutputStringStream();
      String optionitem = null;
      String menuitem = null;

      menu.nativeStream.println("<SELECT " + selectoptions + ">");
      { Stella_Object item = null;
        Cons iter000 = items;
        int i = Stella.NULL_INTEGER;
        int iter001 = 1;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest, iter001 = iter001 + 1) {
          item = iter000.value;
          i = iter001;
          { Surrogate testValue000 = Stella_Object.safePrimaryType(item);

            if (Surrogate.subtypeOfStringP(testValue000)) {
              { StringWrapper item000 = ((StringWrapper)(item));

                optionitem = item000.wrapperValue;
                menuitem = item000.wrapperValue;
              }
            }
            else if (testValue000 == OntosaurusUtil.SGT_STELLA_CONS) {
              { Cons item000 = ((Cons)(item));

                optionitem = ((StringWrapper)(item000.value)).wrapperValue;
                menuitem = ((StringWrapper)(item000.rest.value)).wrapperValue;
              }
            }
            else {
              { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

                stream000.nativeStream.print("`" + testValue000 + "' is not a valid case option");
                throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
              }
            }
          }
          menu.nativeStream.println("<OPTION VALUE='" + optionitem + "'" + (((i == 1) ? " SELECTED" : "")) + ">" + menuitem + "</OPTION>");
        }
      }
      menu.nativeStream.println("</SELECT>");
      return (menu.theStringReader());
    }
  }