0 Replies - 1161 Views - Last Post: 20 July 2010 - 07:49 AM

#1 Crunch   User is offline

  • D.I.C Lover
  • member icon

Reputation: 139
  • View blog
  • Posts: 1,222
  • Joined: 28-July 09

[Scheme] Check Character Case

Posted 20 July 2010 - 07:49 AM

Description:
(define checkcase(lambda (X)
                  
(cond
( (and (>= (char->integer (string-ref X 0) ) 97 )  (<= (char->integer (string-ref X 0) ) 122 ) ) (display " Lower Case"  ))
( (and (>= (char->integer (string-ref X 0) ) 65 )  (<= (char->integer (string-ref X 0) ) 91 ) ) (display " Upper Case"  ))
(else (display " Not a character" ))
)
                   
))

Is This A Good Question/Topic? 0
  • +

Page 1 of 1