title: Racket -UpperCase
body: <pre><code>; defining the procedure char_toupper to convert a lower case character to upper case
  (define char_toupper (lambda (myChar)
                         ; defining x as the ASCII value of myChar
                         (define x (char-&gt;integer myChar))
                         ; defining y as x-32
                         (define y (- x 32))
                         ; if statement for while x is less than 91 (already uppercase)
                         (if (&lt; x 91)
                              ; if it is already uppercase, just display it
                              (display myChar)
                              ; otherwise, if x is greater than 96 (lowercase)
                              (if (&gt; x 96)
                                  ; then display the character equivalent to the ASCII value given by y
                                  (display (integer-&gt;char y))))))
  
  (define string_toupper (lambda (myString newString i)       
                           (if (&lt; i (string-length myString))
                               (string_toupper myString (string-append newString (char_toupper (string-ref myString i))) (+ 1 i)))
  
                           (display newString)))
  (string_toupper (read) "" 0)
  </code></pre>
  
  <p>This converts each character to upper case, and displays it. But I keep getting an error and I can find it. Any help. Thanks</p>