Fundamentals of CS I (CS151 2001S) : Reference

char? - determine if a value is a character

Procedurechar?
Parametersval, a value
PurposeDetermines if val is a character.
ProducesA truth value: true (#t) if val is a character, false (#f) if it's not.
PreconditionsOnly one parameter (verified).
Examples
> (char? #\t)
#t
> (char? #t)
#f
> (char? 't)
#f
> (char? "t")
#f
> (char? t)
reference to undefined identifier: t
> (char? #\0)
#t
> (char? 0)
#f
> (char? null)
#f
See Also
char-alphabetic?,
char-numeric?,
char-lower-case?,
char-upper-case?,
char-whitespace?

Disclaimer: I usually create these pages on the fly. This means that they are rarely proofread and may contain bad grammar and incorrect details. It also means that I may update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This page was generated by Siteweaver on Thu Feb 22 05:47:48 2001.
This page may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2001S/char-p.html.
You may validate this page's HTML.
The source was last modified Sun Feb 4 20:56:57 2001.