;; -*-theme-d-*-

;; Copyright (C) 2008-2013 Tommi Höynälänmaa
;; Distributed under GNU General Public License version 3,
;; see file doc/GPL-3.

;; Expected results: translation and running OK


(define-proper-program (tests test114)

  (import (standard-library core)
	  (standard-library text-file-io)
	  (standard-library console-io))

  (define-simple-proc main (() <none> nonpure)
    (console-display-string "Give number: ")
    (let ((answer (console-read-character)))
      (let ((response
	     (cond
	      ((equal? answer #\0) 1)
	      ((equal? answer #\1) 1.5)
	      ((equal? answer #\2) "apple")
	      ((eof? answer) "orange")
	      (else 'banana))))
	(console-display answer)
	(console-newline)
	(console-display response)
	(console-newline)))))
